diff options
Diffstat (limited to 'settings.py')
| -rw-r--r-- | settings.py | 41 |
1 files changed, 28 insertions, 13 deletions
diff --git a/settings.py b/settings.py index 64dbfc5..023e2db 100644 --- a/settings.py +++ b/settings.py @@ -159,18 +159,32 @@ For security reasons, enabling this is not recommended.''', }), ('default_resolution', { - 'type': int, - 'default': 720, + 'type': str, + 'default': 'auto', 'comment': '', 'options': [ - (144, '144p'), - (240, '240p'), - (360, '360p'), - (480, '480p'), - (720, '720p'), - (1080, '1080p'), - (1440, '1440p'), - (2160, '2160p'), + ('auto', 'Auto'), + ('144', '144p'), + ('240', '240p'), + ('360', '360p'), + ('480', '480p'), + ('720', '720p'), + ('1080', '1080p'), + ('1440', '1440p'), + ('2160', '2160p'), + ], + 'category': 'playback', + }), + + ('playback_mode', { + 'type': str, + 'default': 'auto', + 'label': 'Playback mode', + 'comment': 'HLS uses hls.js (multi-audio). DASH uses av-merge (single audio).', + 'options': [ + ('auto', 'Auto (HLS preferred)'), + ('hls', 'Force HLS'), + ('dash', 'Force DASH'), ], 'category': 'playback', }), @@ -217,7 +231,8 @@ For security reasons, enabling this is not recommended.''', (2, 'Always'), ], 'category': 'playback', - 'description': 'If set to Prefer or Always and the default resolution is set to 360p or 720p, uses the unified (integrated) video files which contain audio and video, with buffering managed by the browser. If set to prefer not, uses the separate audio and video files through custom buffer management in av-merge via MediaSource unless they are unavailable.', + 'hidden': True, + 'description': 'Deprecated: HLS is now used exclusively for all playback.', }), ('use_video_player', { @@ -522,7 +537,7 @@ else: globals().update(current_settings_dict) -if route_tor: +if globals().get('route_tor', False): print("Tor routing is ON") else: print("Tor routing is OFF - your YouTube activity is NOT anonymous") @@ -542,7 +557,7 @@ def add_setting_changed_hook(setting, func): def set_img_prefix(old_value=None, value=None): global img_prefix if value is None: - value = proxy_images + value = globals().get('proxy_images', False) if value: img_prefix = '/' else: |
