Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plex webhook episode detection for non-episode videos #1126

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

LordFlashmeow
Copy link
Contributor

@LordFlashmeow LordFlashmeow commented May 11, 2024

Use title + episode number (or TVDB season + episode #) for non-Episode type videos.

Use Plex API to fetch the filename of the watched video file (for non-episode type videos).

This should allow the Plex webhook to mark specials and other video types as watched.

There is a corner case where the user has multiple episodes with the same file name in a series, handling that is TBD.

@harshithmohan harshithmohan requested a review from Cazzar May 12, 2024 05:54
.Where(a => a.EpisodeTypeEnum == episodeType)
.Where(a => a.Title.Equals(metadata.Title))
.Where(a => a.AniDB_Episode.EpisodeNumber == episodeNumber
|| (a.TvDBEpisode?.SeasonNumber == series && a.TvDBEpisode?.EpisodeNumber == episodeNumber)).ToList();
Copy link
Member

Choose a reason for hiding this comment

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

Not a huge fan of this - the reason is doing this "a or b" could cause erroneous matches.

var nameMatches = anime
.GetAnimeEpisodes().Where(a => a.AniDB_Episode != null)
.Where(a => a.EpisodeTypeEnum == episodeType)
.Where(a => a.Title.Equals(metadata.Title))
Copy link
Member

Choose a reason for hiding this comment

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

What about the situation where a user changes the episode title?

Dash and others added 2 commits May 12, 2024 14:12
Use title + episode number (or TVDB season + episode #) for non-Episode type videos.
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.

None yet

2 participants