[extractor/youtube] Process post_live over 2 hours

This commit is contained in:
pukkandan 2023-06-26 07:25:47 +05:30
parent ef8509c300
commit d949c10c45
No known key found for this signature in database
GPG Key ID: 7EEE9E1E817D0A39

View File

@ -3737,7 +3737,7 @@ def append_client(*client_names):
def _needs_live_processing(self, live_status, duration): def _needs_live_processing(self, live_status, duration):
if (live_status == 'is_live' and self.get_param('live_from_start') if (live_status == 'is_live' and self.get_param('live_from_start')
or live_status == 'post_live' and (duration or 0) > 4 * 3600): or live_status == 'post_live' and (duration or 0) > 2 * 3600):
return live_status return live_status
def _extract_formats_and_subtitles(self, streaming_data, video_id, player_url, live_status, duration): def _extract_formats_and_subtitles(self, streaming_data, video_id, player_url, live_status, duration):
@ -4238,7 +4238,7 @@ def is_bad_format(fmt):
for fmt in filter(is_bad_format, formats): for fmt in filter(is_bad_format, formats):
fmt['preference'] = (fmt.get('preference') or -1) - 10 fmt['preference'] = (fmt.get('preference') or -1) - 10
fmt['format_note'] = join_nonempty(fmt.get('format_note'), '(Last 4 hours)', delim=' ') fmt['format_note'] = join_nonempty(fmt.get('format_note'), '(Last 2 hours)', delim=' ')
if needs_live_processing: if needs_live_processing:
self._prepare_live_from_start_formats( self._prepare_live_from_start_formats(