mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-02 17:22:31 +01:00
[extractor/youtube] Do not warn on duplicate chapters
Eg: vYbaM8w8yzw
This commit is contained in:
parent
1fb53b946c
commit
709ee21417
@ -3034,8 +3034,9 @@ def _extract_chapters(self, chapter_list, chapter_time, chapter_title, duration,
|
|||||||
self.report_warning(f'Incomplete chapter {idx}')
|
self.report_warning(f'Incomplete chapter {idx}')
|
||||||
elif chapters[-1]['start_time'] <= chapter['start_time'] <= duration:
|
elif chapters[-1]['start_time'] <= chapter['start_time'] <= duration:
|
||||||
chapters.append(chapter)
|
chapters.append(chapter)
|
||||||
else:
|
elif chapter not in chapters:
|
||||||
self.report_warning(f'Invalid start time for chapter "{chapter["title"]}"')
|
self.report_warning(
|
||||||
|
f'Invalid start time ({chapter["start_time"]} < {chapters[-1]["start_time"]}) for chapter "{chapter["title"]}"')
|
||||||
return chapters[1:]
|
return chapters[1:]
|
||||||
|
|
||||||
def _extract_comment(self, comment_renderer, parent=None):
|
def _extract_comment(self, comment_renderer, parent=None):
|
||||||
|
Loading…
Reference in New Issue
Block a user