mirror of
https://github.com/yt-dlp/yt-dlp
synced 2025-12-17 22:55:42 +07:00
[EmbedSubtitles] Slightly relax duration check
and related cleanup Closes #1385
This commit is contained in:
@@ -38,7 +38,7 @@ def run(self, info):
|
||||
if not chapters and not sponsor_chapters:
|
||||
return [], info
|
||||
|
||||
real_duration = self._get_real_video_duration(info)
|
||||
real_duration = self._get_real_video_duration(info['filepath'])
|
||||
if not chapters:
|
||||
chapters = [{'start_time': 0, 'end_time': real_duration, 'title': info['title']}]
|
||||
|
||||
@@ -72,7 +72,6 @@ def remove_chapters(file, is_sub):
|
||||
os.replace(out_file, in_file)
|
||||
files_to_remove.append(uncut_file)
|
||||
|
||||
info['_real_duration'] = info['chapters'][-1]['end_time']
|
||||
return files_to_remove, info
|
||||
|
||||
def _mark_chapters_to_remove(self, chapters, sponsor_chapters):
|
||||
|
||||
Reference in New Issue
Block a user