Include livestream fmt urls for former livestream w/o static urls
If none of the format urls for the former livestream are static, meaning they use a non-livestream format playable by the browser, then include the dialog for copying hte livestream format urls into external video player
This commit is contained in:
parent
803c901445
commit
44d7f9da99
@ -242,9 +242,21 @@ def extract_info(video_id, use_invidious, playlist_id=None, index=None):
|
||||
decryption_error = 'Error decrypting url signatures: ' + decryption_error
|
||||
info['playability_error'] = decryption_error
|
||||
|
||||
# check if urls ready (non-live format) in former livestream
|
||||
# urls not ready if all of them have no filesize
|
||||
if info['was_live']:
|
||||
info['urls_ready'] = False
|
||||
for fmt in info['formats']:
|
||||
if fmt['file_size'] is not None:
|
||||
info['urls_ready'] = True
|
||||
else:
|
||||
info['urls_ready'] = True
|
||||
|
||||
# livestream urls
|
||||
# sometimes only the livestream urls work soon after the livestream is over
|
||||
if info['hls_manifest_url'] and (info['live'] or not info['formats']):
|
||||
if (info['hls_manifest_url']
|
||||
and (info['live'] or not info['formats'] or not info['urls_ready'])
|
||||
):
|
||||
manifest = util.fetch_url(info['hls_manifest_url'],
|
||||
debug_name='hls_manifest.m3u8',
|
||||
report_text='Fetched hls manifest'
|
||||
|
Loading…
x
Reference in New Issue
Block a user