Metadata agents for exported XBMC library

A number of us just finished trying out some things.

I hope this makes sense to you. I’m just the FexEx guy here :smiley:

The dev made some observations and has recommendations for your NFO agent.

First,

Do not modify the Plex-distributed agents.

Second,

MOVIES

   contributes_to = [
        'com.plexapp.agents.themoviedb',
        'com.plexapp.agents.imdb'
    ]

TV

    contributes_to = [
        'com.plexapp.agents.thetvdb',
    ]

Third,

Do this for Movies. Then wash, rinse, and repeat for TV.

Please get back with your results.

Additional information. One hand-crafted NFO we tested with contained this:

<movie>
    <title>Star Wars (1977 Original Theatrical Release)</title>
    <originaltitle>Star Wars</originaltitle>
    <year>1977</year>
    <set>Star Wars Saga</set>
    <sorttitle>Star Wars 101</sorttitle>
</movie>

Placed in the directory with the movie, the movie file was named sw.mkv. All metadata and posters came right up

How does it handle Season Art for TV Libraries? I think that what was broken… Movies always worked fine.

From what we can see, it does fine.

This is why I brought it here. We would like your help in making sure this suits your needs too.

IF there are still issues after updating your importer bundle, the dev wants to hear back ASAP.

I will let you know once I can upgrade my server…not a pass user : (

Once the dev updates the agent I will update and test.

Edit: Are you also talking to the dev of Hama and ASS?

I couldn’t get it to work. Even with plex dance. Still no season posters but then I couldn’t even get the plex agent to import custom season art and following their naming conventions: season01.jpg in season folder.

@mcrommert said:
Once the dev updates the agent I will update and test.

Edit: Are you also talking to the dev of Hama and ASS?

SSA / ASS subtitles are inherent to the server whether muxed in the file or sidecar.

Regarding ‘Once the dev updates the agent…’, you can go search your local copy of the XBMC agent and edit it. After you do, restart PMS to have it update.

@ChuckPA said:

@mcrommert said:
Once the dev updates the agent I will update and test.

Edit: Are you also talking to the dev of Hama and ASS?

SSA / ASS subtitles are inherent to the server whether muxed in the file or sidecar.

Regarding ‘Once the dev updates the agent…’, you can go search your local copy of the XBMC agent and edit it. After you do, restart PMS to have it update.

I didn’t mean ASS subtitles…was talking about Absolute Series Scanner and Hama (anidb agent). The same problem exists there as i described in an earlier post

Will have to read through the code…my python knowledge is definitely beginner

@ChuckPa said:
A number of us just finished trying out some things.

I hope this makes sense to you. I’m just the FexEx guy here :smiley:

The dev made some observations and has recommendations for your NFO agent.

First,

Do not modify the Plex-distributed agents.

Second,

MOVIES

   contributes_to = [
        'com.plexapp.agents.themoviedb',
        'com.plexapp.agents.imdb'
    ]

TV

    contributes_to = [
        'com.plexapp.agents.thetvdb',
    ]

Third,

Do this for Movies. Then wash, rinse, and repeat for TV.

Please get back with your results.

Is this your fix for not pulling the season posters via the XMBC TV agent? Where exactly do you add that code to the __init__.py file?

As the dev told me, When the XMBC agent contributes_to, the data flow path is established.

That said, if the XMBC TV agent is providing the poster artwork name & path (independent of PMS naming requirement), PMS gets it.

There is a framework concept… Primary and Secondary agents.

The primary agents are the Plex agents. Secondary agents are those we write .
Specifying ‘accepts_from’ defines a primary agent.
Specifying ‘contributes_to’ defines a secondary agent.

Specifying both obviously allows an agent (plug-in) to work in either capacity.

What the Plex dev first suggests is having the plug -in be that secondary agent because , after he read the github code, that’s the only thing which appears to be missing; the contributes_to. This is where his thinking is at and why it’s a first step. He also referenced how WebTools works with PMS and the agents. He suggested that is very stable interfacing example (written by a Plex Ninja)

I’m feeling a bit lost/confused. My Library is set to Scanner=Plex Series Scanner, Agent=XBMCnfoTVImporter. This used to work correctly, and set the season/specials/show level posters. I’m not, and never have, used com.plexapp.agents.thetvdb at all. Is this going to ever work again like it used to, or are you saying we need to add the contributes_to and change the Agent on the library to the Plex provided agent? Otherwise I can’t see how adding contributes_to does anything.

the syntax of the contributes_to is a list. the XMBC importer can contribute to any of the Plex agents.

I don’t know if 1.3.0 introduced a change to the Framework or not. I do not know PMS at that level and probably never will.
I do know there were changes made to the matching code.

Having been a developer for years, I’m comfortable thinking the dev wants to isolate where the issue is. Is it solely because the plug-in has to be ‘called out’ by name to contribute or has it changed/broken in the data flow deeper in the matching logic (where the Plex scanner, thetvdb, imdb, tmdb, etc all come together). I can only liken it to data busses. Which one is the issue. I think he’s trying to peel back the layers until we find where manual direct-connect works.

I have just installed the new update to PMS (version 1.4.1.3362) then re-scanned my tv shows with the XMBC nfo agent. I can confirm that all posters, fanart & episode thumbnail are NOT being pickup from what I have locally in each tvshow folder. Show information, tags & episodes synopsis are OK however (same as in my local NFO files)…

I guess we will have to wait :frowning:

Forgot to mention… the agent is also picking up external .srt files now…

Forgive me please???

There are posts here which just seem to complain because it’s not in the distribution package.

Let me be perfectly clear. It won’t be in the distribution package until such time as we can show what needs to change. The dev is willing. He just needs to know what to change.

@ChuckPA:
I have to report the same findings as @simfec99. With version 1.4.1.3362 the problem has gotten worse for the XBMCnfoTVImporter. Now there is no artwork picked up any longer. No tv show poster, no episode posters, no episode thumbs. This is even if doing the changes, you recommended regarding contributes_to. It happens when using the TheTVDB Importer as primary agent but putting XBMCnfoTVImporter above it (like shown in your screenshot) and it happens when using the XBMCnfoTVImporter as primary agent without using an plex agent in conjunction.

For the Movies Importer it is working fine, if using the XBMCnfoMoviesImporter only. If using Plex Movie as primary agent putting XBMCnfoMoviesImporter above it (like shown in your screenshot) it works partially. Only some movies get their info and art populated. Some others are missing everything.

It is essential, that you let your dev check what is wrong importing tv show series posters and tv show episode thumbnails when using the XBMCnfoTVImporter only. Making it contributing to the plex agents is nice to have, but IMHO secondary to solving the bug that keeps third party agents from setting series posters and episode thumbnails and now tv show posters and fanart too.

@ChuckPA:
If your dev needs a testing library, with locally stored nfo files, posters, series posters, episode thumbnails and fanart, I can provide that. Just give me a ping. It will be easier if he installs the agents himself on his system and tests with a library like we all have and want it to work.

@SlrG

That’s what he and another team member did. I was the ‘thread gopher’ to scroll back & forth through the thread.

The NFO file we crafted to test with was this:

<movie>
    <title>Star Wars (1977 Original Theatrical Release)</title>
    <originaltitle>Star Wars</originaltitle>
    <year>1977</year>
    <set>Star Wars Saga</set>
    <sorttitle>Star Wars 101</sorttitle>
</movie>

The actual file was named SW.mkv and PMS matched and pulled up all the metadata.

What we got from it is below.

Did we do it incorrectly?

Hi all!

Please understand that we are trying to narrow down where the issue is with the 3rd-party agent and PMS ingesting metadata.

One such data point to do this, is to edit the XBMCnfoTVImporter agent and add contributes_to like so below the accepts_from line in __init__.py

contributes_to = ['com.plexapp.agents.thetvdb']

Then set your primary agent to The TVDB for the library, and enable XBMCnfoTVImporter under TheTVDB and drag it above The TVDB like so. Be sure to check the disable agents artwork support (use local media assets instead) under the XBMCnfoTVImporter agent settings.

Then see if artwork and NFO importing work.

The second test is to do as follows;

set your primary agent to The TVDB for the library, and enable XBMCnfoTVImporter under TheTVDB and drag it above The TVDB like so. Be sure to un check the disable agents artwork support (use local media assets instead) under the XBMCnfoTVImporter agent settings. and uncheck the Local Media Assets (TV) agent.

Then see if artwork and NFO importing work.

These two tests will give us great data points as to where/what the the change is.