vosmiic / jellyfin-ani-sync

Synchronize anime watch status between Jellyfin and anime tracking sites.
GNU General Public License v3.0
214 stars 15 forks source link

Manual Sync (Jellyfin -> Provider) not respecting "Libraries to check" #114

Closed BlakeTech closed 2 weeks ago

BlakeTech commented 3 months ago

Describe the bug From the console, the shows it's scanning to push up to anilist include some that are not in the anime libraries explicitly selected in the upper sections.

To Reproduce Steps to reproduce the behavior: Install plugin Configure client id/secret for anilist select anime library to check, disable "Plan to watch" and "rewatching" toggles save manual sync (cause I can't tell if auto sync even works at all)

Expected behavior It should only scan shows in the specific library as configured above. Also, it should keep trying until it finishes, not randomly stop somewhere without notification. That leads to the sync never completing properly, and multiple reruns don't seem to fix it.

Desktop (please complete the following information):

BlakeTech commented 3 months ago

Side note, regarding the random stopping, it seems to happen when the response is too slow from jellyfin. Not sure what the cause is since the hardware's fairly modern (4650g), and when re-running the plugin it seems to look again from the very start instead of some log to keep track.

There are also reports of "too many requests" , so perhaps slow down the process?

Addendum: It's actually remarkably repeatable. Starts the sync on the same (wrong library)series, and the last series it does before it reaches a "slow response" is exactly the same.

Addendum 2: Series that show up as none watched are skipped. Is there a way to override that? Or add those as "plan to watch"? Presumably, if the script detects it in the library, it's in there for a reason. Namely, to be watched at some time in the future?

vosmiic commented 3 months ago

It should only scan shows in the specific library as configured above.

I agree, I'll add this to the todo list.

Also, it should keep trying until it finishes, not randomly stop somewhere without notification

This is difficult to accomplish as this is a background fire and forget job so it can't notify the user of failures (apart from through the logs), so not much can be done here.

when re-running the plugin it seems to look again from the very start instead of some log to keep track

This is difficult to keep track of as the plugin is unaware of external changes, since this feature is really designed to only be used once (most install the plugin and then run the manual sync to update their providers, and then the plugin will naturally update any changes after that as you watch shows through Jellyfin) I don't think there is much need to keep track of the progress.

There are also reports of "too many requests" , so perhaps slow down the process?

I would highly suggest building a version of the plugin from master, as I have just pushed up a commit that fixes this issue due to #109. Its not quite ready for release yet so if you are unable to build a version, there are docker build instructions here or I can build a version with the fix in it for you.

Series that show up as none watched are skipped. Is there a way to override that? Or add those as "plan to watch"?

Also a good idea, and can be easily added. I'll add it to the todo list.

BlakeTech commented 3 months ago

I think I'll just wait for the plugin to update. I can build it with docker, but i don't know what arguments are needed, and the kubernetes setup that Truenas uses seems rather touchy doing things manually.

Mr0Cake commented 3 months ago

If it's not too much work, could you release a beta version? Otherwise I will look into building it myself because I'm struggling a bit with the anilist sync issue. Thanks!

vosmiic commented 3 months ago

If it's not too much work, could you release a beta version?

Sure, I'll look into it. There have been a few other fixes so its probably a good time to get a new beta version out

vosmiic commented 2 months ago

@Mr0Cake not sure if you saw but there is a new beta version that contains the AniList fixes

Mr0Cake commented 2 months ago

sync is working in 3.1.0.0, very nice! I tried it with a new config, but I could not get the authcallback working. It appears that it's just reporting a failure while it does work for some reason. looks a bit like it's redirecting to /AniSync/authCallback with a GET upon success [2024-04-18 09:54:19.103 +02:00] [WRN] [35] Jellyfin.Server.Middleware.ResponseTimeMiddleware: Slow HTTP Response from "http://192.168.1.78:8096/AniSync/authCallback?code=code-redacted" to "192.168.1.41" in 0:00:00.60645 with Status Code 302 [2024-04-18 09:54:56.744 +02:00] [INF] [29] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets. [2024-04-18 09:55:08.744 +02:00] [INF] [37] Emby.Server.Implementations.Session.SessionWebSocketListener: Lost 1 WebSockets. [2024-04-18 09:56:20.744 +02:00] [INF] [3] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets. [2024-04-18 09:56:32.720 +02:00] [ERR] [43] Jellyfin.Server.Middleware.ExceptionMiddleware: Error processing request. URL "GET" "/AniSync/authCallback". System.NullReferenceException: The user you are attempting to authenticate does not exist in the plugins config file

trying to figure out if I can see it in code somewhere

vosmiic commented 2 months ago

I'll have a look and see why you are hitting into issues with the callback. Do note that I am away from my dev PC (and will be a for a while) so updates will be slow unfortunately.

BlakeTech commented 2 months ago

Finally had time to check back. Unfortunately, jellyfin can't seem to find 3.1, so I am currently unable to test it. Maybe I don't have the beta repo added in, most likely.

Oh, additionally, is there a way for it to check specific tags for series to skip over when updating?

vosmiic commented 2 months ago

Finally had time to check back. Unfortunately, jellyfin can't seem to find 3.1, so I am currently unable to test it. Maybe I don't have the beta repo added in, most likely.

Yeah should have said you need the beta plugin manifest enabled, which can be done by following these instructions.

Oh, additionally, is there a way for it to check specific tags for series to skip over when updating?

Not at the moment, but I can have a look at implementing it if its a feature you would like to be added.

Jtecx commented 2 months ago

Not at the moment, but I can have a look at implementing it if its a feature you would like to be added.

Yeah, that'd be great!

Edit: Yup, the timeout error does indeed still exist too!

vosmiic commented 2 months ago

Yup, the timeout error does indeed still exist too!

Ah okay, I'll create a new issue for this since I think we are straying away from the original issue