nylonee / watchlistarr

Customizable sync of Plex Watchlist to Sonarr/Radarr
GNU General Public License v3.0
172 stars 13 forks source link

Some troubles with matching the titles #79

Closed imrs776 closed 6 months ago

imrs776 commented 7 months ago

I have some troubles with incorrect recognision of my watchlist. The service at first deletes the title on start, and after several seconds it adds it back and start the downloading. Added some logs from from watchlistarr and generated rss watchlist.

Looks like it tries to remove the items besides of the fact that it is present in the rss list.

watchlistarr logs.txt RSS feed for self.txt

nylonee commented 7 months ago

This is really interesting, I haven't seen this before!

I'd suggest you turn off the deleter sync for now (using the ALLOW_MOVIE_DELETING variable), until we can figure out what happened here.

Let me try this on my side first (tomorrow), and if I can't replicate it then I'll ask you for some more details.

nylonee commented 7 months ago

This continues to elude me, could you provide me some more details?

Let's drill in on just one movie and understand what's happening:

Captain America: Civil War

Could you look up this movie in Plex, find the friend who's added it to their watchlist, then go to their profile and see if the movie shows up on their watchlist? Your RSS feed you provided has 39 items, which matches up with the number of items that were fetched via plex token, so I doubt it's an issue with fetching the items. But best to be sure.

Also, has this happened only once, or several times?

imrs776 commented 7 months ago

The Captain America: Civil War is added by me, and as I understand only by me. There are 39 items in my watchlist right now, and also a lot of items in my friends watchlist.

This happends after any restart of the container. Here is the logs after restart right now:

01:33:10.169 [io-compute-11] INFO  configuration.ConfigurationUtils$ - Successfully connected to Sonarr
01:33:10.230 [io-compute-4] INFO  configuration.ConfigurationUtils$ - Successfully connected to Radarr
01:33:10.612 [io-compute-4] INFO  configuration.ConfigurationUtils$ - Generated watchlist RSS feed for self: Some()
01:33:10.850 [io-compute-7] INFO  configuration.ConfigurationUtils$ - Generated watchlist RSS feed for friends: Some()
01:33:11.143 [io-compute-14] INFO  PingTokenSync$ - Refreshed the access token expiry
01:33:15.133 [io-compute-15] INFO  PlexTokenSync$ - Found 20 items on user's watchlist using the plex token
01:33:25.769 [io-compute-1] INFO  PlexTokenDeleteSync$ - Found show "Attack on Titan" which is not watchlisted on Plex
01:33:25.769 [io-compute-1] INFO  PlexTokenDeleteSync$ - Found show "BLUE EYE SAMURAI" which is not watchlisted on Plex
01:33:25.769 [io-compute-1] INFO  PlexTokenDeleteSync$ - Found show "Dorohedoro" which is not watchlisted on Plex
01:33:25.769 [io-compute-1] INFO  PlexTokenDeleteSync$ - Found show "Frieren: Beyond Journey's End" which is not watchlisted on Plex
01:33:25.769 [io-compute-1] INFO  PlexTokenDeleteSync$ - Found movie "Napoleon" which is not watchlisted on Plex
01:33:25.770 [io-compute-1] INFO  PlexTokenDeleteSync$ - Found movie "Avatar: The Way of Water" which is not watchlisted on Plex
01:33:25.770 [io-compute-1] INFO  PlexTokenDeleteSync$ - Found movie "Suzume" which is not watchlisted on Plex
01:33:25.770 [io-compute-1] INFO  PlexTokenDeleteSync$ - Found movie "Guardians of the Galaxy" which is not watchlisted on Plex
01:33:25.770 [io-compute-1] INFO  PlexTokenDeleteSync$ - Found show "THE iDOLM@STER Cinderella Girls U149" which is not watchlisted on Plex
01:33:25.770 [io-compute-1] INFO  PlexTokenDeleteSync$ - Found movie "A Whisker Away" which is not watchlisted on Plex
01:33:25.770 [io-compute-1] INFO  PlexTokenDeleteSync$ - Found show "Gurren Lagann" which is not watchlisted on Plex
01:33:25.770 [io-compute-1] INFO  PlexTokenDeleteSync$ - Found movie "Jujutsu Kaisen 0" which is not watchlisted on Plex
01:33:25.770 [io-compute-1] INFO  PlexTokenDeleteSync$ - Found movie "Captain America: Civil War" which is not watchlisted on Plex
01:33:25.770 [io-compute-1] INFO  PlexTokenDeleteSync$ - Found show "Arcane" which is not watchlisted on Plex
01:33:25.770 [io-compute-1] INFO  PlexTokenDeleteSync$ - Found show "Dr. Stone" which is not watchlisted on Plex
01:33:25.770 [io-compute-1] INFO  PlexTokenDeleteSync$ - Found show "Dark Gathering" which is not watchlisted on Plex
01:33:25.770 [io-compute-1] INFO  PlexTokenDeleteSync$ - Found show "The Apothecary Diaries" which is not watchlisted on Plex
01:33:25.771 [io-compute-1] INFO  PlexTokenDeleteSync$ - Found show "Nanbaka" which is not watchlisted on Plex
01:33:25.771 [io-compute-1] INFO  PlexTokenDeleteSync$ - Found show "Berserk of Gluttony" which is not watchlisted on Plex
01:33:25.771 [io-compute-1] INFO  PlexTokenDeleteSync$ - Found show "The Fall of the House of Usher" which is not watchlisted on Plex
01:33:25.771 [io-compute-1] INFO  PlexTokenDeleteSync$ - Found movie "Weathering with You" which is not watchlisted on Plex
01:33:26.540 [io-compute-9] INFO  PlexTokenSync$ - Found 45 items on other available watchlists using the plex token
01:33:26.609 [io-compute-4] WARN  PlexTokenSync$ - Found movie "Kenobi: A Star Wars Fan Film" which does not exist yet in Radarr, but we do not have the tmdb ID so will skip adding

For some reason it finds only 20 items in my watchlist. But there are, as I said, 39, plus some unknown amount from my friends watchlists.

I also tried to set SKIP_FRIEND_SYNC=true:

01:36:40.028 [io-compute-12] INFO  configuration.ConfigurationUtils$ - Successfully connected to Sonarr
01:36:40.088 [io-compute-11] INFO  configuration.ConfigurationUtils$ - Successfully connected to Radarr
01:36:40.473 [io-compute-6] INFO  configuration.ConfigurationUtils$ - Generated watchlist RSS feed for self: Some()
01:36:40.474 [io-compute-6] INFO  configuration.ConfigurationUtils$ - Generated watchlist RSS feed for friends: None
01:36:40.789 [io-compute-6] INFO  PingTokenSync$ - Refreshed the access token expiry
01:36:42.858 [io-compute-6] INFO  PlexTokenSync$ - Found 20 items on user's watchlist using the plex token
01:36:42.859 [io-compute-6] INFO  PlexTokenSync$ - Found 0 items on other available watchlists using the plex token
01:36:42.949 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found movie "A.I. Artificial Intelligence" which is not watchlisted on Plex
01:36:42.949 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "Why Women Kill" which is not watchlisted on Plex
01:36:42.950 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "Attack on Titan" which is not watchlisted on Plex
01:36:42.950 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "Star Wars: The Bad Batch" which is not watchlisted on Plex
01:36:42.950 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found movie "Star Wars: The Rise of Skywalker" which is not watchlisted on Plex
01:36:42.950 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "Money Heist" which is not watchlisted on Plex
01:36:42.950 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "Star Wars: Tales of the Jedi" which is not watchlisted on Plex
01:36:42.950 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found movie "Star Wars" which is not watchlisted on Plex
01:36:42.950 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "Elfen Lied" which is not watchlisted on Plex
01:36:42.950 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found movie "Avengers: Endgame" which is not watchlisted on Plex
01:36:42.950 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "BLUE EYE SAMURAI" which is not watchlisted on Plex
01:36:42.950 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "Dorohedoro" which is not watchlisted on Plex
01:36:42.950 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "House of the Dragon" which is not watchlisted on Plex
01:36:42.950 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "Frieren: Beyond Journey's End" which is not watchlisted on Plex
01:36:42.950 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found movie "Napoleon" which is not watchlisted on Plex
01:36:42.950 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found movie "Anatomy of a Fall" which is not watchlisted on Plex
01:36:42.950 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "Demon Prince Enma" which is not watchlisted on Plex
01:36:42.950 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "Doctor Who (2005)" which is not watchlisted on Plex
01:36:42.950 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "Steins;Gate" which is not watchlisted on Plex
01:36:42.950 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "Star Wars Rebels" which is not watchlisted on Plex
01:36:42.950 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found movie "The Boy and the Heron" which is not watchlisted on Plex
01:36:42.950 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found movie "Avatar: The Way of Water" which is not watchlisted on Plex
01:36:42.950 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found movie "Star Wars: The Force Awakens" which is not watchlisted on Plex
01:36:42.950 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "Fired on Mars" which is not watchlisted on Plex
01:36:42.950 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "Alice in Borderland (2020)" which is not watchlisted on Plex
01:36:42.950 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found movie "The Empire Strikes Back" which is not watchlisted on Plex
01:36:42.950 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found movie "Suzume" which is not watchlisted on Plex
01:36:42.950 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "When They Cry - Higurashi" which is not watchlisted on Plex
01:36:42.950 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found movie "Guardians of the Galaxy" which is not watchlisted on Plex
01:36:42.951 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "THE iDOLM@STER Cinderella Girls U149" which is not watchlisted on Plex
01:36:42.951 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found movie "Rogue One: A Star Wars Story" which is not watchlisted on Plex
01:36:42.951 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "Formula 1: Drive to Survive" which is not watchlisted on Plex
01:36:42.951 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "Stalk" which is not watchlisted on Plex
01:36:42.951 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "Star Wars: The Clone Wars" which is not watchlisted on Plex
01:36:42.951 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found movie "Star Wars: The Last Jedi" which is not watchlisted on Plex
01:36:42.951 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found movie "Return of the Jedi" which is not watchlisted on Plex
01:36:42.951 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found movie "Solo: A Star Wars Story" which is not watchlisted on Plex
01:36:42.951 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found movie "Ocean Waves" which is not watchlisted on Plex
01:36:42.951 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found movie "A Whisker Away" which is not watchlisted on Plex
01:36:42.951 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "Gurren Lagann" which is not watchlisted on Plex
01:36:42.951 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found movie "Jujutsu Kaisen 0" which is not watchlisted on Plex
01:36:42.951 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "Shaman King" which is not watchlisted on Plex
01:36:42.951 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found movie "Captain America: Civil War" which is not watchlisted on Plex
01:36:42.951 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found movie "Star Wars: Episode II - Attack of the Clones" which is not watchlisted on Plex
01:36:42.951 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "Arcane" which is not watchlisted on Plex
01:36:42.951 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "Wolf's Rain" which is not watchlisted on Plex
01:36:42.951 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "Dr. Stone" which is not watchlisted on Plex
01:36:42.951 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "Overtake!" which is not watchlisted on Plex
01:36:42.951 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "Dark Gathering" which is not watchlisted on Plex
01:36:42.951 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found movie "Star Wars: Episode I - The Phantom Menace" which is not watchlisted on Plex
01:36:42.951 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "The Apothecary Diaries" which is not watchlisted on Plex
01:36:42.951 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "Nanbaka" which is not watchlisted on Plex
01:36:42.951 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found movie "Star Wars: Episode III - Revenge of the Sith" which is not watchlisted on Plex
01:36:42.951 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found movie "Top Gun: Maverick" which is not watchlisted on Plex
01:36:42.951 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "Berserk of Gluttony" which is not watchlisted on Plex
01:36:42.951 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "The Fall of the House of Usher" which is not watchlisted on Plex
01:36:42.951 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "Onimusha" which is not watchlisted on Plex
01:36:42.952 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "Another" which is not watchlisted on Plex
01:36:42.952 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "Friends" which is not watchlisted on Plex
01:36:42.952 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found show "True Detective" which is not watchlisted on Plex
01:36:42.952 [io-compute-13] INFO  PlexTokenDeleteSync$ - Found movie "Weathering with You" which is not watchlisted on Plex

I have check one more this. There is an item in my watchlist Captain America: Civil War. There is an item Captain America: Civil War in my RSS feed. There is no item Captain America: Civil War in my friend RSS feed.

my RSS feed.txt friends RSS feed.txt

imrs776 commented 7 months ago

I also checked the number of items in RSS feed and there are:

So, this means that it should sync 62 items.

nylonee commented 7 months ago

This is very interesting, there's a chance that this is because we fetch items from Plex one page at a time, and Plex might be delivering a different "page" to you than what I've been using as a template. Would you be okay with reaching out to me on discord (nylonee)? I would like to create a custom container for you to run with some extra debug logs enabled, so that we can identify the issue

imrs776 commented 7 months ago

sure, I've just sent you a request

nylonee commented 7 months ago

For posterity, we discussed offline and found that there are a few changes that Plex has made to their API to limit the watchlist API to only return 20 items (for the main user). We've found a workaround and I'll get coding away on that.

There's still the aspect of friends watchlists that is not working which I'll investigate as well as part of this.

nylonee commented 6 months ago

@imrs776 Sorry I didn't get back to this in a while. I've taken a look and my friends sync seems to be accurate, are you still facing issues with this or should I close this?

nylonee commented 6 months ago

Will close this issue for now, if the issue is persisting then feel free to open a new one :)