1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2025-01-09 14:47:55 +01:00

[AnimeLab] Fix height extraction

This commit is contained in:
Mariusz Skoneczko 2020-02-01 17:12:40 +11:00
parent 282c7a1af4
commit 066f0442f1

View File

@ -159,10 +159,12 @@ class AnimeLabIE(AnimeLabBaseIE):
else:
quality = None
height = None
if quality:
height = int_or_none(self._search_regex(r'(\d+)p?$', quality, 'Video format height', default=None, fatal=False))
else:
height = None
height = int_or_none(self._search_regex(r'(\d+)p?$', quality, 'Video format height', default=None))
if height is None and quality.startswith('SD'):
# sometimes we are only told it's SD quality
height = 480
if height is None:
self.report_warning('Could not get height of video')