mdhiggins / PlexAutoSkip

Automatically skip content in Plex
MIT License
198 stars 11 forks source link

[FR] Work around the Plex Roku autoplay bug that replays multi-episode files #62

Open alainbryden opened 8 months ago

alainbryden commented 8 months ago

I'm not sure if you have personally encountered this long standing bug playing multi-episode files in the Plex app for Roku, but with the solution you've put together here, I feel like there's a good chance you could solve it using the same infrastructure.

When autoplaying TV shows that include multiple episodes per video (e.g. "Pj Masks - S01E01-E02", "Puffin Rock - S01E01-E03") the server will correctly mark all 2 or 3 episodes as watched, and the desktop/web players will correctly go on to play the next file (e.g. "Pj Masks - S01E03-E04", "Puffin Rock - S01E04-E06").

The Roku app, however, will think it has only just played episode 1, then go on to request episode 2 - which is linked to the same file, so the TV ends up playing the same 2 (or 3) episodes you just watched over again. When my kids are watching, this means they're calling out every 10-15 minutes or so "Heeeyyy I just watched this one!!". The only workaround I know of is to be there to back out (quit autoplay) and manually select the next episode (Plex has marked all linked episodes as watched by this time, so it seems it's just an autoplay issue). That or manually split all episodes into separate files (which is messy and time-consuming).

Perhaps you can detect if the next episode to be auto-played is the same file on disk as the one that was just played, you can skip past it until a new file is the result? (Might break some playlists intentionally playing the same file over and over again - so perhaps it needs to be an optional feature).