luigi311 / JellyPlex-Watched

Sync watched between jellyfin and plex locally
GNU General Public License v3.0
392 stars 19 forks source link

[Feature Request] Jellyfin sync #87

Open Lucifer1903 opened 1 year ago

Lucifer1903 commented 1 year ago

Can this be used to sync between 2 jellyfin users?

luigi311 commented 1 year ago

You might be able to just add the same jellyfin server twice and use the user mapping to link the two users. Be sure to test it with the dryrun on just in case but it shouldn't cause any issues though.

Tuckie commented 1 year ago

I just tried this to sync statuses on two users on a single Jellyfin server. and it didn't work. (zero watch statuses synced).

I had the server and token listed twice with user mapping between the two users. It showed all of the episodes getting pulled in, but ended with:

[INFO]: server 1 watched that needs to be synced to server 2:
{}
[INFO]: server 2 watched that needs to be synced to server 1:
{}

Checking the logs with debug enabled was full of these type of entries at the end: Removing SPEED from Anime due to exact match

Any ideas why this is happening?

C0NTi commented 10 months ago

To hazard a guess, server 1 and server 2 are exactly the same, the both have exactly the same users so they are both in sync, nothing to change.

The api key isnt specific to a user in jellyfin, and there is no way as far as i can tell to use the user mapping to exclude one user from server 1 and exclude the other from server 2

image

burneystarke commented 8 months ago

Could you just make multiple API keys for the same server?

tonyzzz321 commented 7 months ago

You might be able to just add the same jellyfin server twice and use the user mapping to link the two users. Be sure to test it with the dryrun on just in case but it shouldn't cause any issues though.

I added the same server twice and then mapped the 2 users together. When I dry-run, I get the below exception.

[ERROR]: Jellyfin: Failed to get watched, Error: Conflicting values for subkey 'Movies' under key 'user1'
[ERROR]: Conflicting values for subkey 'Movies' under key 'user1'
[ERROR]: Traceback (most recent call last):
  File "/app/src/jellyfin.py", line 558, in get_watched
    user_watched_combine = combine_watched_dicts(user_watched)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/src/watched.py", line 25, in combine_watched_dicts
    raise ValueError(
ValueError: Conflicting values for subkey 'Movies' under key 'user1'
luigi311 commented 7 months ago

I think this currently runs into issues, i'm currently rewriting a bunch of things and will be testing with two plex and two jellyfin servers as well to make sure thats working.

Tuckie commented 7 months ago

That's great to hear! My use case is syncing between a "family" account and individual user accounts on the same jellyfin server.