Skip to content

Conversation

@blacktwin
Copy link
Collaborator

Adding support for the new Intro Marker for episode class.
Marker class's id and tag are purely cosmetic.

@blacktwin
Copy link
Collaborator Author

Currently reload() doesn't really exist for Season or Show but there additional attributes we can pull when doing so. Season and Show both return tags for Preferences and On Deck. I'd like to see about adding these into this PR.

@Hellowlol
Copy link
Collaborator

Hellowlol commented May 23, 2020

Nice. I planned to add this. My plan was reuse some bw_plex code to add this as chapters

@blacktwin
Copy link
Collaborator Author

Hahaha yeah I wanted to beat anyone else to it. Was my take sufficient?

@Hellowlol
Copy link
Collaborator

Hellowlol commented May 23, 2020

I’m not sure. I think so but I havnt looked at the xml yet. You won 🎉

@blacktwin
Copy link
Collaborator Author

blacktwin commented May 24, 2020

Applying the _include string to a shows key gives us the show preferences, hub items (similar items, more from studio and/or writer/director/etc.) and what is OnDeck for this show. If show is not watched then the first episode is what is OnDeck.

@amazingr4b
Copy link

Nice work getting this potentially added so fast. I put these changes in my setup, and made use of them in the process listener to automatically skip the intros. Has worked well for me so for.

@blacktwin
Copy link
Collaborator Author

blacktwin commented May 25, 2020

for episode in plex.library.section('TV Shows').search(libtype='episode'):
    if episode.hasIntroMarker:
        print(episode.title + ' ready to skip intro')
    else:
        print(episode.title + ' analyzing...')
        episode.analyze()

Not sure it'd be a good idea to do that but 🤷

plexapi/video.py Outdated
""" Returns True if this episode has an intro marker in the xml. """
if not self.isFullObject():
self.reload()
return bool(self.markers)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would only check for intro markers in case Plex decides to add different marker types in the future.

any(marker.type == 'intro' for marker in self.markers)

@Hellowlol
Copy link
Collaborator

Anything else you want to add in this?

@Hellowlol Hellowlol merged commit b98d2e9 into master Jun 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants