diff options
Diffstat (limited to 'settings.py')
| -rw-r--r-- | settings.py | 38 |
1 files changed, 26 insertions, 12 deletions
diff --git a/settings.py b/settings.py index 023e2db..25a5266 100644 --- a/settings.py +++ b/settings.py @@ -1,4 +1,18 @@ from youtube import util +from youtube.i18n_strings import ( + AUTO, + AUTO_HLS_PREFERRED, + ENGLISH, + ESPANOL, + FORCE_DASH, + FORCE_HLS, + NEWEST, + PLAYBACK_MODE, + RANKING_1, + RANKING_2, + RANKING_3, + TOP, +) import ast import re import os @@ -139,8 +153,8 @@ For security reasons, enabling this is not recommended.''', 'comment': '''0 to sort by top 1 to sort by newest''', 'options': [ - (0, 'Top'), - (1, 'Newest'), + (0, TOP), + (1, NEWEST), ], }), @@ -163,7 +177,7 @@ For security reasons, enabling this is not recommended.''', 'default': 'auto', 'comment': '', 'options': [ - ('auto', 'Auto'), + ('auto', AUTO), ('144', '144p'), ('240', '240p'), ('360', '360p'), @@ -179,12 +193,12 @@ For security reasons, enabling this is not recommended.''', ('playback_mode', { 'type': str, 'default': 'auto', - 'label': 'Playback mode', + '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'), + ('auto', AUTO_HLS_PREFERRED), + ('hls', FORCE_HLS), + ('dash', FORCE_DASH), ], 'category': 'playback', }), @@ -194,7 +208,7 @@ For security reasons, enabling this is not recommended.''', 'default': 1, 'label': 'AV1 Codec Ranking', 'comment': '', - 'options': [(1, '#1'), (2, '#2'), (3, '#3')], + 'options': [(1, RANKING_1), (2, RANKING_2), (3, RANKING_3)], 'category': 'playback', }), @@ -203,7 +217,7 @@ For security reasons, enabling this is not recommended.''', 'default': 2, 'label': 'VP8/VP9 Codec Ranking', 'comment': '', - 'options': [(1, '#1'), (2, '#2'), (3, '#3')], + 'options': [(1, RANKING_1), (2, RANKING_2), (3, RANKING_3)], 'category': 'playback', }), @@ -212,7 +226,7 @@ For security reasons, enabling this is not recommended.''', 'default': 3, 'label': 'H.264 Codec Ranking', 'comment': '', - 'options': [(1, '#1'), (2, '#2'), (3, '#3')], + 'options': [(1, RANKING_1), (2, RANKING_2), (3, RANKING_3)], 'category': 'playback', 'description': ( 'Which video codecs to prefer. Codecs given the same ' @@ -316,8 +330,8 @@ Archive: https://archive.ph/OZQbN''', 'default': 'en', 'comment': 'Interface language', 'options': [ - ('en', 'English'), - ('es', 'EspaƱol'), + ('en', ENGLISH), + ('es', ESPANOL), ], 'category': 'interface', }), |
