[EmbedSubtitles] Slightly relax duration check
and related cleanup Closes #1385
This commit is contained in:
parent
e04b003e64
commit
5ce1d13eba
2 changed files with 23 additions and 23 deletions
|
|
@ -38,7 +38,7 @@ class ModifyChaptersPP(FFmpegPostProcessor):
|
|||
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 @@ class ModifyChaptersPP(FFmpegPostProcessor):
|
|||
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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue