Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract more-complex chapters from the pinned comment; select "normal" chapters or comment chapters #21

Open
wants to merge 125 commits into
base: master
Choose a base branch
from

Conversation

Lazyt3ch
Copy link
Contributor

@Lazyt3ch Lazyt3ch commented Nov 23, 2022

Hi Ilya,

I've found a case where each comment line can contain either one or more chapters, or no chapters at all: https://www.youtube.com/watch?v=PzlLXQ3RaDs
I've added some code to extract chapters from such comments.

I've also found a case where the chapters provided in the pinned comment are much better than the "key moments" automatically added by YouTube: https://www.youtube.com/watch?v=5Gt61EX6HZ4
In that case, when the extension tries to fetch chapters, it gets the "key moments" instead – and displays them as chapters. Unfortunately, the result makes no sense.
I've made minor changes to the extension, and now, if both the "normal" chapters (that is, either full-fledged chapters or "key moments") and the chapters extracted from the pinned comment are available, it select the more-numerous ones.

Actually, both cases are pretty unusual, so I'm not sure if handling them is worth the effort.

Regards,
Rashid

P.S. I've also added the following functionality:

  • Handling abnormal comment chapters (titles before timestamps)
  • Sorting chapters by timestamps

…ns and declarative_net_request in Chrome-specific manifest.json file
Lazyt3ch and others added 30 commits February 4, 2023 16:19
…URLS with multiple search params (content.js)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants