Taxel / PlexTraktSync

A python script that syncs the movies, shows and ratings between trakt and Plex (without needing a PlexPass or Trakt VIP subscription)
MIT License
1.56k stars 101 forks source link

Episodes skipped, being reported as "local" when they are not local #268

Closed BEisem closed 3 years ago

BEisem commented 3 years ago

The problem

I'm trying to sort out an issue I'm seeing where quite a few episodes are being reported like this:

2021-04-18 10:46:28,953 ERROR[PlexTraktSync]:Skipping <local:280773:<Episode:280773:Charlie's-Angels-s01e08>>: Provider local not supported

and they are being skipped. But when I look into the XML, it shows a valid source for the episode. So I'm not sure why they are being reported as local and being skipped.

This episode has the following GUIDs in the XML:

<Guid id="imdb://tt0539227"/>
<Guid id="tmdb://247618"/>
<Guid id="tvdb://232391"/>

I'm not sure why the script is not finding the info, and falling back to local...

Expected behavior

Episodes should not fall back to local (and be skipped) if there is info available online

BEisem commented 3 years ago

By the way, this is happening on all versions since the message "Provider local not supported" was added ... I don't remember what version that was...

glensc commented 3 years ago

Please post inspect 280773 output.

also, "Provider local not supported" should not be displayed, it should be silently ignored. But there are some copy-paste errors. I will not fix t his before https://github.com/Taxel/PlexTraktSync/pull/254, because that removes the duplication, and resolves the bad copy paste.

BEisem commented 3 years ago

Here you go...

bink@Plex-Server PlexTraktSync-0.7.25 % ./plex_trakt_sync.sh inspect 280773    
Inspecting: <local:280773:<Episode:280773:Charlie's-Angels-s01e08>>
Guid: 'local://280773'
Guids: []
Audio: '5.1(side)', 'English (DTS-HD MA 5.1)'
Video: 'h264'
Provider: local
Id: 280773
Error: search_type must be one of ('trakt', 'trakt-movie', 'trakt-show', 'trakt-episode', 'trakt-person', 'imdb', 'tmdb', 'tvdb')
glensc commented 3 years ago

So, this local item has no .guid or .guids, where you took that XML has those guides? maybe you mislooked?

BEisem commented 3 years ago

I took the XML directly from Plex. Here is the full XML from Plex for this episode. You can see the GUIDs listed. Somehow PlextraktSync is not finding those GUIDs.

https://gist.github.com/BEisem/e3f146e2f1df0330f14467953651d25b

glensc commented 3 years ago

@BEisem you posted info about 69980

BEisem commented 3 years ago

I don't understand what you mean.

bink@Plex-Server PlexTraktSync-0.7.25 % ./plex_trakt_sync.sh sync --show="Charlie's Angels"
INFO: Syncing with Plex BlaEis and Trakt binkatl
INFO: Syncing Show: Charlie's Angels
INFO: Loaded Trakt lists in 11.5 seconds
INFO: Server version 1.22.2.4282-a97b03fad updated at: 2021-04-18 09:03:09
INFO: Recently added: [<Season:380942:Leonardo-s1>, <Movie:380934:Rocky-IV>, <Movie:380931:Right-in-Front-of-Me>, <Movie:380929:American-Dream>, <Season:380924:Godfather-of-Harlem-s2>]
ERROR: Skipping <local:280773:<Episode:280773:Charlie's-Angels-s01e08>>: Provider local not supported
INFO: Updated plex watchlist in 0.0 seconds
INFO: Completed full sync in 17.8 seconds

This is a sync on Charlie's Angels. It is showing an error on Season 1 Episode 8. So I went to Plex, opened that episode, viewed the XML, and posted the XML as a gist.

What am I missing here?

glensc commented 3 years ago

@BEisem you did not took xml for 280773, but 69980.

apparently, you did something wrong, I can't figure out that for you.

to open item in question open:

BEisem commented 3 years ago

It turns out I was trying to sync one show, but actually it was syncing another show with the same title (a remake of the original). I've created a new Issue for this problem of multiple shows with the same name. https://github.com/Taxel/PlexTraktSync/issues/272

glensc commented 3 years ago

@BEisem you forgot to cross-link for future readers.

BEisem commented 3 years ago

It's linked directly above my comment, but ok, I just added it to the comment as well.

BEisem commented 3 years ago

Please post inspect 280773 output.

also, "Provider local not supported" should not be displayed, it should be silently ignored. But there are some copy-paste errors. I will not fix t his before https://github.com/Taxel/PlexTraktSync/pull/254, because that removes the duplication, and resolves the bad copy paste.

Actually this information is useful, because it helps find library items that are not linked to items on TMDB. Since that is a user-supported platform, it has allowed me to go in and add missing episodes. Please do not remove this, or at least make it available with debug logging turned on.

glensc commented 3 years ago

Yes, it should go to debug log. And seems you are confusing here missing on trakt vs local guid errors.

The local guid means the library item is not associated. But indeed, why it's not associated could comr from the fact that there's not match on tmdb.

BEisem commented 3 years ago

Good to know it will remain in the debug log. And no, I'm not confusing it ... I'm just using the local guid error as a symptom that something is wrong, and that for some reason the item in the Plex library did not get associated with anything. So I'm going through and looking at each, trying to figure out why it didn't get associated. I'm finding that more often than not, it's because there is a missing (or mismatched) item in TMDB.