mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-09-06 03:02:25 +03:00
Fix youtube --live-from-start for premieres
This commit is contained in:
@@ -1812,14 +1812,17 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|||||||
with lock:
|
with lock:
|
||||||
refetch_manifest(format_id, delay)
|
refetch_manifest(format_id, delay)
|
||||||
|
|
||||||
f = next((f for f in formats if f.get('format_id') == format_id and 'manifest_url' in f), None)
|
f = next((f for f in formats if f.get('format_id') == format_id), None)
|
||||||
if not f:
|
if not f:
|
||||||
# still no manifest_url → retry
|
|
||||||
if not is_live:
|
if not is_live:
|
||||||
retry.error = f'{video_id}: Video is no longer live'
|
retry.error = f'{video_id}: Video is no longer live'
|
||||||
else:
|
else:
|
||||||
retry.error = f'Cannot find refreshed manifest for format {format_id}{bug_reports_message()}'
|
retry.error = f'Cannot find refreshed manifest for format {format_id}{bug_reports_message()}'
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if not isinstance(f, dict) or not f.get('manifest_url'):
|
||||||
|
break
|
||||||
|
|
||||||
return f.get('manifest_url'), f.get('manifest_stream_number'), is_live
|
return f.get('manifest_url'), f.get('manifest_stream_number'), is_live
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user