Fix max_resolution in TOR mode

some videos have 480p resolution, and if setting only 360p the player would have no video to play
This commit is contained in:
Jesús 2021-08-02 18:46:50 -05:00
parent e37c7eed58
commit 382035d32f
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766
2 changed files with 2 additions and 1 deletions

View File

@ -143,6 +143,7 @@ For security reasons, enabling this is not recommended.''',
'comment': '', 'comment': '',
'options': [ 'options': [
(360, '360p'), (360, '360p'),
(480, '480p'),
(720, '720p'), (720, '720p'),
], ],
'category': 'playback', 'category': 'playback',

View File

@ -27,7 +27,7 @@ except FileNotFoundError:
def get_video_sources(info, tor_bypass=False): def get_video_sources(info, tor_bypass=False):
video_sources = [] video_sources = []
if (not settings.theater_mode) or (settings.route_tor == 2) or tor_bypass: if (not settings.theater_mode) or (settings.route_tor == 2) or tor_bypass:
max_resolution = 360 max_resolution = 480
else: else:
max_resolution = settings.default_resolution max_resolution = settings.default_resolution
for fmt in info['formats']: for fmt in info['formats']: