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

Force speed but not for music #1539

Merged
merged 2 commits into from
Jan 16, 2023

Conversation

samyk
Copy link
Contributor

@samyk samyk commented Jan 16, 2023

Adds an option under Player->Forced Playback Speed (when enabled) to Force playback speed for music, defaults off so that if user does force an alternate playback speed, it doesn't apply to music.

Improved the music detection by checking the description (and in some cases the description doesn't load, so interval runs until it exists but maxes out at 5 secs)

I don't know the other languages so I used English in all the locale files for consistency.

Resolves #1538

@ImprovedTube
Copy link
Member

ImprovedTube commented Jan 16, 2023

English in all the locale files for consistency

(We made a locale.py for this before https://github.com/code-for-charity/ImprovedTube-for-YouTube/blob/master/py/locale.py )

Can also skip the step for now like: text: 'Force playback speed for music', since extensions default to displaying that. - (that's as long as it is not translated, once translated it unfortunately only allows letters numbers & underscores 😆 & these wont be displayed in Firefox)

@samyk
Copy link
Contributor Author

samyk commented Jan 16, 2023

Ahh nice! Might be neat to not update the locales at all, and instead have locale priorities that gets generated when the plugin is loaded. So if someone adds something to the en locale, it should not exist in any others (and that makes it easier for people to know what needs to be translated). Instead module loads, goes through all locales to produce object of each key, and fills it out based on language priority, so if someone's priorities are 'it->es->en->all others' then it first looks for key in it and if not there, then looks in es, etc. Would only happen on startup so runtime is fast.

@ImprovedTube
Copy link
Member

ImprovedTube commented Feb 12, 2023

when the plugin is loaded.

( *at installation/updates and held in storage; leaving the way predefined by the browsers)

@samyk
Copy link
Contributor Author

samyk commented Feb 12, 2023

when the plugin is loaded.

( *at installation and held in storage, leaving the way predefined by the browsers)

even better!

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.

Suggestion: allow forced playback speed for everything /but/ music
2 participants