Hellowlol / bw_plex

binge watching for plex
MIT License
366 stars 23 forks source link

Add intro end / credit end markers in EDL / inline chapters #127

Closed antifuchs closed 4 years ago

antifuchs commented 4 years ago

This change adds a config setting to bw_plex that makes it write a chapter marker (type "scene marker") for the "intro end" and "credits end" timestamp.

This is specifically for plex folks (like me) who don't like it when bw_plex skips for them, but want to manually skip to the beginning/end of the intro: Plex doesn't support "duration" type markers like "commercial break", so the only thing that the interface showed before was a chapter "Intro" at the very beginning.

Now, it also shows an "intro end" marker, which makes me much happier.

I hope you will consider this for inclusion.

antifuchs commented 4 years ago

For validating that this works, I built a docker image and rolled this onto my media machine, where it correctly added an "Intro end" chapter. (I'll send you another PR for improvements to the docker build process!)

codecov[bot] commented 4 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@fc64975). Click here to learn what that means. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #127   +/-   ##
=========================================
  Coverage          ?   81.89%           
=========================================
  Files             ?       10           
  Lines             ?     1331           
  Branches          ?        0           
=========================================
  Hits              ?     1090           
  Misses            ?      241           
  Partials          ?        0           
Impacted Files Coverage Δ
bw_plex/edl.py 73.58% <0.00%> (ø)
bw_plex/db.py 95.00% <0.00%> (ø)
bw_plex/video.py 93.75% <0.00%> (ø)
bw_plex/credits.py 88.48% <0.00%> (ø)
bw_plex/misc.py 81.43% <0.00%> (ø)
bw_plex/config.py 84.00% <0.00%> (ø)
bw_plex/hashing.py 73.62% <0.00%> (ø)
bw_plex/plex.py 76.90% <0.00%> (ø)
bw_plex/cli.py 100.00% <0.00%> (ø)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update fc64975...02adbb2. Read the comment docs.

Hellowlol commented 4 years ago

Nice to see somebody using my project! 👍

I thought I had set scene marker as default. What’s the difference between a commercial break and scene marker?

We could probably just add the end marker in addition as default.

Thanks the PR

antifuchs commented 4 years ago

I'm not sure what the real difference is, to be honest - it probably varies from player to player; Plex shows the two in the same way, but I imagine other players that have support for it (Kodi probably?) would take the duration of a commercial break type chapter and skip over it.

I can remove the configuration bit - it's a separate commit for that very reason - let me know what you prefer (:

Hellowlol commented 4 years ago

Just remove the config option. Lets make this default. I think it’s enough as the user can skip chapters creation if they want.

antifuchs commented 4 years ago

Updated - now it happens by default (:

Hellowlol commented 4 years ago

Thanks!