trakt / Plex-Trakt-Scrobbler

Add what you are watching on Plex to trakt.tv
1.45k stars 166 forks source link

GUID Detection does not work with Media Center Master scanner / metadata #81

Closed rgon10 closed 10 years ago

rgon10 commented 10 years ago

Hello,

I have an issue, and a possible fix for the mentioned issue.

The issue is that I use Media Center Master and scanner for managing metadata and handing it over to plex. Media Center Master uses a GUID of "com.plexapp.agents.mcm://MCM_TVA" and was not supported in the REGEX matching done by the trakt plugin. I received the GUID matching failed error on all tv series.

A possible fix, that is working for me is changing the following lines in \Contents\Code\plex\media-server.py

TVSHOW_REGEXP = Regex('com.plexapp.agents.(thetvdb|abstvdb|xbmcnfotv|mcm)://(MCM_TVA|._)(?P[-a-z0-9.]+)/' '(?P[-a-z0-9.]+)/(?P[-a-z0-9.]+)') TVSHOW1_REGEXP = Regex('com.plexapp.agents.(thetvdb|abstvdb|xbmcnfotv|mcm)://(MCM_TVA|._)([-a-z0-9.]+)')

Detection is currently working for me and handing the correct TVDB id for MCM to the plugin. Scrobbling is also working properly for me. Testing would need to be done to see if the updated regex would still work on the normal tvdb scanner.

I am also using MCM for Movie handling and have yet to figure out a way to get an ID handed over to this plugin, as the GUID is generated by MCM for movies. For now, my fix has been to revert to TMDB as the Agent.

fuzeman commented 10 years ago

I'll try get that update to the guid matching regex (after testing) into master branch later today or tomorrow.

There is also a way to scrobble by just title and year which I've been thinking of adding as a fallback, this would mean movie scrobbling would roughly work for you but might not be exact (it's up to trakt.tv to match it against their database).

I would rather leave adding this fallback for scrobbling until the feature/syncing-2.0 branch is merged in, as this brings quite a few changes to the core of the plugin.

rgon10 commented 10 years ago

Thanks! I appreciate the quick response.

The main thing was to get tv series working properly for me and I am glad that I could come up with a possible working solution. Thanks for merging and testing this.

For now, I'm happy with using Plex's media agent for movies, as all I use media center master for on movies is renaming and sorting of the files.

fuzeman commented 10 years ago

That fix is in the develop branch now and will be released into the master branch shortly.

I've created issue #82 to cover adding title and year scrobbling, so will close this issue now.