1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-03 08:35:32 +00:00

[cleanup] Misc

Closes #5897
This commit is contained in:
pukkandan
2023-02-17 17:52:22 +05:30
parent 30031be974
commit a538772969
26 changed files with 84 additions and 47 deletions

View File

@ -133,9 +133,9 @@ class RadikoBaseIE(InfoExtractor):
'X-Radiko-AreaId': area_id,
'X-Radiko-AuthToken': auth_token,
})
not_preferred = is_onair and not pcu.startswith(self._HOSTS_FOR_LIVE) or (not is_onair and (pcu.startswith(self._HOSTS_FOR_TIME_FREE_FFMPEG_UNSUPPORTED) or pcu.startswith(self._HOSTS_FOR_LIVE)))
for sf in subformats:
if not_preferred:
if (is_onair ^ pcu.startswith(self._HOSTS_FOR_LIVE)) or (
not is_onair and pcu.startswith(self._HOSTS_FOR_TIME_FREE_FFMPEG_UNSUPPORTED)):
sf['preference'] = -100
sf['format_note'] = 'not preferred'
if not is_onair and url_attrib['timefree'] == '1' and time_to_skip: