mmmmmtasty / SportScanner

Scanner and Metadata Agent for Plex that uses sportdb
115 stars 31 forks source link

"Refresh" metadata from Plex does nothing #8

Closed rickjtaylor closed 8 years ago

rickjtaylor commented 8 years ago

"Refreshing" an episode's metadata appears to not do anything.

To test this, I've modified one line of code in the plugin: Line: 281 episode.summary = "Matched by SportScanner" changed to episode.summary = matched_episode['strDescriptionEN']

This allows me to monkey with the corresponding episode's Description on thesportsdb.com and then attempt the refresh.

I update the data. I manually check the searchfilename call, all good, data changed. Refresh the episode in Plex Media Server, log spits out the attached log.

The refresh starts at time 6:32. The following error occurs a couple of entries into it:

2015-11-19 06:32:57,258 (7000029b8000) : DEBUG (model:32) - Loading model with GUID com.plexapp.agents.sportscanner://4387/1011/11067994?lang=en 2015-11-19 06:32:57,259 (7000029b8000) : ERROR (model:205) - Cannot read model from /Users/Rick/Library/Application Support/Plex Media Server/Metadata/TV Shows/d/ece9b49c9f87dec4104ebfeb124491fc974b01a.bundle/Contents/com.plexapp.agents.sportscanner

The remainder looks like everything flows properly.

A quick side note. It looks like it is downloading a lot of fan art, but I have no idea where any of that art is getting used. In Plex, I see a single, universal, NBA logo, and a single thumbnail for each episode. The logo is definitely coming from thesportsdb.com. I doubt the thumbnails are, they are just individual screen grabs from the file themselves. So what is all of this other stuff being downloaded and where does it go?

Thanks again! com.plexapp.agents.sportscanner.txt

mmmmmtasty commented 8 years ago

I think you are hitting a caching issue.

If you update the description on thesportsdb, then refresh your metadata in plex you will not see an update. If you check the xml file though at the path mentioned in the log file (for example /Users/Rick/Library/Application Support/Plex Media Server/Metadata/TV Shows/d/ece9b49c9f87dec4104ebfeb124491fc974b01a.bundle/Contents/com.plexapp.agents.sportscanner/seasons/0708/episode number.xml) you will see that the description in there has updated as expected.

If you then restart plex which I guess clears out whatever cache this is then you will see the updated description.

The metadata is changing the underlying data and you can check and confirm that the data is actually being updated and I'm pretty sure the rest of the process is out of my control!

mmmmmtasty commented 8 years ago

So restarting Plex doesn't necessarily help but waiting does, I think this is actually working as expected :)

mmmmmtasty commented 8 years ago

Also - you mentioned the art.

Fanart is alternative backgrounds for the sport - edit the sport to select your favourite. Posters are the main poster for it. I need to stop it being downloaded if it already has been - I have done that already for show specific data just not yet sport related data