Compare commits

...

2 Commits

Author SHA1 Message Date
sepro
0a5a1d9e19 Slight formatting changes 2024-02-09 16:43:12 +01:00
bashonly
ee40684652
enforce is_live title in test
Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com>
2024-02-09 15:34:18 +00:00

View File

@ -565,7 +565,7 @@ class TVPVODVideoIE(TVPVODBaseIE):
'info_dict': {
'id': '399731',
'ext': 'mp4',
'title': r're:TVP WORLD(?: \d{4}-\d{2}-\d{2} \d{2}:\d{2})?',
'title': r're:TVP WORLD \d{4}-\d{2}-\d{2} \d{2}:\d{2}',
'live_status': 'is_live',
'thumbnail': 're:https?://.+',
},
@ -574,8 +574,8 @@ class TVPVODVideoIE(TVPVODBaseIE):
def _real_extract(self, url):
category, video_id = self._match_valid_url(url).group('category', 'id')
entity = 'lives' if category == 'live,1' else 'vods'
is_live = category == 'live,1'
entity = 'lives' if is_live else 'vods'
info_dict = self._parse_video(self._call_api(f'{entity}/{video_id}', video_id), with_url=False)
playlist = self._call_api(f'{video_id}/videos/playlist', video_id, query={'videoType': 'MOVIE'})
@ -593,7 +593,7 @@ class TVPVODVideoIE(TVPVODBaseIE):
'ext': 'ttml',
})
info_dict['is_live'] = category == 'live,1'
info_dict['is_live'] = is_live
return info_dict