8000 Preferences overhaul by SamantazFox · Pull Request #2377 · iv-org/invidious · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

SamantazFox
Copy link
Member
@SamantazFox SamantazFox commented Sep 2, 2021

This PR aims to fix a lot of issues and imrpove a lot of things related to user preferences.

Fixes

Improvements

To be discussed

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.
@unixfox
Copy link
Member
unixfox commented Sep 3, 2021

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)?

@SamantazFox
Copy link
Member Author

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 = 1080p, and a video with streams up to 2160p:

1080p  # Theorically un-supported, so client skips it
720p   # Highest quality supported
480p
360p
240p
144p  # Worst available
2160p # Best available

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"
Copy link
Member

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.

Copy link
Member Author

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}" %}
Copy link
Member

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.

@github-actions

This comment was marked as outdated.

@github-actions github-actions bot added the stale label Dec 26, 2021
@SamantazFox

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked require something else first
Projects
Status: Work In progress
Development

Successfully merging this pull request may close these issues.

3 participants
2A39
0