-
Notifications
You must be signed in to change notification settings - Fork 74
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
base: master
Are you sure you want to change the base?
Conversation
.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(); |
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
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?
Use title + episode number (or TVDB season + episode #) for non-Episode type videos.
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.