Skip to content

Commit

Permalink
Fix: chapters for the first video file
Browse files Browse the repository at this point in the history
  • Loading branch information
xjasonlyu committed Dec 12, 2023
1 parent 15477e3 commit 98539ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Contents/Code/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,9 @@ def get_media_durations(obj):

# Chapters
metadata.chapters.clear()
# only generate chapters if is a single video file
# only generate chapters for the first video file
durations = get_media_durations(media)
if Prefs[KEY_ENABLE_CHAPTERS] and len(durations) == 1 \
if Prefs[KEY_ENABLE_CHAPTERS] and len(durations) > 0 \
and durations[0] > 10 * 60 * 1000:
duration = durations[0]
interval = 5 * 60 * 1000 # every 5 minutes
Expand Down

0 comments on commit 98539ab

Please sign in to comment.