IgnisDa / ryot

Roll your own tracker!
https://ryot.io
GNU General Public License v3.0
1.85k stars 48 forks source link

[Feature Request] Bi directional sync to jellyfin #964

Open chrisb86 opened 1 month ago

chrisb86 commented 1 month ago

I love the Jellyfin integration. Everything was imported quite nice. Scrobbling from Jellyfin works fine too.

Something I miss is the sync from ryot TO Jellyfin. When I watch a movie in Cinema and track it in ryot it would be nice to have it marked as watched, when I add the movie to Jellyfin anytime later.

IgnisDa commented 1 month ago

When I watch a movie in Cinema

Can you tell me what this is? Never heard of it.

chrisb86 commented 1 month ago

I mean a real world movie theater.

IgnisDa commented 1 month ago

Oh lol.

Won't the Radarr integration be a better fit here? Once you have watched a movie, you add it to a collection in Ryot. Ryot forwards it to Radarr and the movie gets downloaded. Then you can watch it on Jellyfin anytime you want.

Jacob-Tate commented 4 weeks ago

Syncing watch history with Jellyfin in this scenario presents challenges, particularly when the movie isn't yet in Jellyfin's database. A preferable approach would be implementing a live burst sync mechanism. This would work as follows:

When you mark a movie as watched, it would connect to Jellyfin. It would send a message like "IMDB ID 1234 has been watched." If that ID doesn't exist in Jellyfin, the server would simply ignore it.

This method offers several advantages:

It prevents issues where marking something as unwatched for a rewatch interferes with Jellyfin's "Play Next" feature. It avoids Ryot repeatedly marking items as watched unnecessarily. It mitigates potential problems with Jellyfin incorrectly logging multiple views for a single watch (although Jellyfin may not have a watch counter).

Additionally, this approach addresses concerns for users with extensive watch histories. I have 15k entries which would need to sync. The proposed system might:

Take several minutes to mark everything as watched. Risk server timeouts. Generate unnecessary processing load if syncing occurs multiple times per hour.

By implementing a live burst sync, we can create a more efficient and user-friendly system that reduces server strain and improves overall functionality.

Jacob-Tate commented 4 weeks ago

Maybe we can implement a button on the media piece which performs a watch history sync? IE if the user has a sync to plex/emby/jellyfin theres a sync button under more actions to sync watch progress which will perform that live burst?

IgnisDa commented 4 weeks ago

To be honest, I don't understand the point of having this integration in the first place. IMO Jellyfin should be used to only watch movies, not track or download anything. So it does not make sense for Ryot to be sending data to Jellyfin.

I am waiting for @chrisb86 opinion of the Radarr sync (https://github.com/IgnisDa/ryot/issues/964#issuecomment-2290729247) method.

chrisb86 commented 4 weeks ago

The suggestion of @Jacob-Tate sounds quite good.

For me this has nothing to do with downloading media so the Radaar integration doesn't nail it. I want to achive the following: If a movie or episode that I watched anytime ago in my live happens to get to my jellyfin server will get correctly marked as watched. I would like ryot to replace trakt as my single source of truth of watched states. It is not about getting media but syncing the correct state.

If I watched a movie 15 years ago on DVD and think I would like to watch it again and somehow it appears on my server, I would like to see, that I watched it ago. When I'm at a friends house and watch an episode on netflix that I also have on my server on netflix I would track this by hand in ryot and have this state synced to Jellyfin.

Maybe following could work. When media gets tracked as watched in ryot, jellyfin gets notified (as suggested by @Jacob-Tate. When new media is added to jellyfin, the server could use the webhook to trigger the notification from ryot for this specific media.