Skip to content

Commit

Permalink
Add scene markers for end of intro/credits
Browse files Browse the repository at this point in the history
Those are useful on systems like Plex, which don't look at the
"duration" of chapters, but manual skipping is desired. These will
allow a viewer to select the "intro end" marker and jump to the end of
that segment.
  • Loading branch information
antifuchs committed Apr 25, 2020
1 parent fc64975 commit 02adbb2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions bw_plex/edl.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,28 @@
def db_to_edl(item, type=3):
elds = {}

# Add credits
if (item.correct_theme_start and
item.correct_theme_start != -1 and
item.correct_theme_end and
item.correct_theme_end != -1):

elds["manual intro"] = [item.correct_theme_start, item.correct_theme_end, TYPES[type]]
elds["manual intro end"] = [item.correct_theme_end, item.correct_theme_end, 2]

elif (item.theme_start and
item.theme_start != -1 and
item.theme_end and
item.theme_end != -1):

elds["intro"] = [item.theme_start, item.theme_end, TYPES[type]]

elds["intro end"] = [item.theme_end, item.theme_end, 2]
if (item.credits_start and
item.credits_start != -1 and
item.credits_end and
item.credits_end != -1):

elds["credits"] = [item.credits_start, item.credits_end, TYPES[type]]
elds["credits end"] = [item.credits_end, item.credits_end, 2]

return elds

Expand Down Expand Up @@ -123,5 +124,3 @@ def write_chapters_to_file(path, input_edl=None, replace=True, cleanup=True):
LOG.debug('writing chapters to file using command %s', ' '.join(cmd))

return path


0 comments on commit 02adbb2

Please sign in to comment.