-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Preferences overhaul #2377
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
base: master
Are you sure you want to change the base?
Preferences overhaul #2377
Conversation
this is going to be modified a lot and passed around, so avoid making many copies on the stack.
Use enum for the theme ('dark_mode'), the home pages, the player styles and the sort option. Video qualities still require 'quality' and 'quality_dash' to be merged.
Related to #2236, how are you going to do if 1080p is set as a default video quality but the client only support up to 720p with the video format that have both audio and video in it (like an iOS client)? |
My idea is to sort videos by descending order from the preferred quality to the worst (and putting the others after) so in theory, the client should select the first supported format in the list. E.g, with preferred quality =
|
env_config_file = "INVIDIOUS_CONFIG_FILE" | ||
env_config_yaml = "INVIDIOUS_CONFIG" | ||
|
||
config_file = ENV.has_key?(env_config_file) ? ENV.fetch(env_config_file) : "config/config.yml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should also allow the location of the config file to be set during compile time, which can be done through macros.
Might be helpful for those who wish to deploy Invidious in a more traditional way, but don't want to call the binary with INVIDIOUS_CONFIG_FILE
each time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about also restoring the -c / --config
option?
|
||
# Update config from env vars (upcased and prefixed with "INVIDIOUS_") | ||
{% for ivar in Config.instance_vars %} | ||
{% env_id = "INVIDIOUS_#{ivar.id.upcase}" %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should limit this to just a subset? Allowing for all Invidious config values to be modified via environmental variable seems unnecessary, with the resulting code being rather complex too.
This key never existed before and #2524 just made it obvious.
This PR aims to fix a lot of issues and imrpove a lot of things related to user preferences.
Fixes
Redundant and incoherent URL parameters parsing code
URL parameters being dropped in some cases:
Show Annotations
switches off on Annotation Redirects #2259Inneficient backend handling of variables (i.e using enumerates instead of strings)
Miscellanous fixes:
TODO: [Bug] Typo in new option in preferences #2289Done in a related PRImprovements
Allow a region (YouTube's
gl
parameter) to be passed to change results:Use full language names instead of ISO codes:
Wording/explanation of the options (add tooltips to describe more precisely what options do)
TODO: [Enhancement] Mention that 360° videos requires WebGL #2118Done in related PRMissing preferences options:
Other:
To be discussed