Metadata agents for exported XBMC library

@ChuckPa:
These are all versions since it broke. I already tested 1.2.7 and 1.3.3. What other version do you need me to check?

And like you told @anothername, it would be really nice if his change could be implemented in the distribution by the plex devs. :slight_smile:

I have 1.3.1 and 1.3.2 completed.

note: I’ve dropped a hint to the dev team. cross fingers

@ChuckPa:
Sadly I won’t be able to test 1.3.0. Normally I can define the version I want as an parameter in my plex docker running on my unRAID system. It will then download and use that version, but it seems to be broken now. I hope the debugging will work without it, or you can supply it if needed. Thank you very much for your help with this problem!

@anothername said:

@casperse said:
Is the trailer support in XBMCnfoMoviesImporter only for local stored trailers?
No input on best way to setup agents? I just tried to first run Plex agent and then the XBMCnfoMoviesImporter and it now looks like I have keept trailer and extra for my movies?

You could add XBMCnfoMoviesImporter to the Plex Movie one like this https://i.imgur.com/qZrBmdV.png it will give you all the extras you want https://i.imgur.com/IPDSawA.jpg

That would be so cool “Like having the best of both worlds” but I cannot reproduce this with the XBMCnfoMoviesImporter?
Could you elaborate on this?

@casperse said:

@anothername said:

@casperse said:
Is the trailer support in XBMCnfoMoviesImporter only for local stored trailers?
No input on best way to setup agents? I just tried to first run Plex agent and then the XBMCnfoMoviesImporter and it now looks like I have keept trailer and extra for my movies?

You could add XBMCnfoMoviesImporter to the Plex Movie one like this https://i.imgur.com/qZrBmdV.png it will give you all the extras you want https://i.imgur.com/IPDSawA.jpg

That would be so cool “Like having the best of both worlds” but I cannot reproduce this with the XBMCnfoMoviesImporter?
Could you elaborate on this?

Close Plex (icon in the taskbar, right click exit)
Go here C:\Program Files (x86)\Plex\Plex Media Server\Resources\Plug-ins-b46e0ea\PlexMovie.bundle\Contents\Code and open the file __init__.py

Scroll down to the line you see in the image and add this
accepts_from = ['com.plexapp.agents.localmedia', 'com.plexapp.agents.xbmcnfo']
Then start Plex again, now your Agents should look like this

Just a head’s up to all.

PMS 1.3.4 (plex pass), partially out the door. An automation error forced its rollback to rebuild it. It’s almost done.

@ChuckPa said:
Just a head’s up to all.

PMS 1.3.4 (plex pass), partially out the door. An automation error forced its rollback to rebuild it. It’s almost done.

Are you saying 1.3.4 has the fix for this :slight_smile:

Unknown. I’ve been so blasted busy to even read the release notes.

Since you’re about to modify agents, just wanted to save you the time if you need to modify it twice :slight_smile:

@ChuckPa said:
Just a head’s up to all.

PMS 1.3.4 (plex pass), partially out the door. An automation error forced its rollback to rebuild it. It’s almost done.

1.3.4.3285-b46e0ea doesn’t fix the issue, unless there is another update coming too?

There’s not another version of 1.3.4 coming if that’s what you mean. I did that already today :wink: (had to rebuild the Ubuntu distro due to corruption)

The idea is to import plex database to kodi via plexkodiconnect and then export nfo files. I already tried and that part works but the problem is that plexconnect imports plex collections to kodi as tags and sets. Tags are actually plex collections but sets are limited and incomplete (since movie can belong to only one set) because are also imported from plex collections. So I want to export tags (not sets) to be able to import them (again) to plex via nfo. I can see there is only ‘set’ input in nfo so my questions are:

  1. does xbmc agent imports sets as plex collection?
  2. if answer is yes to the first question - is there a way to make kodi export tags and not sets to nfo file and how?
  3. if answer is no to the first question - is there possible workaround for this?

I have invested long time in tagging almost 10,000 movies via plex collections and I want to be able reorganizing libraries without loosing plex collection data.

@ChuckPa Following on from anothername describing the edits to get agents to play nicely together what would be great would be for agents to expose the accept_from and contribute_to as advanced settings that could be configured by users and so removing the need to make hacks. Would need some thinking about re handling upgrades where you wanted to make changes to the defaults that would pass through to the current settings but it should be straightforward enough.

@maiade said:
@ChuckPa Following on from anothername describing the edits to get agents to play nicely together what would be great would be for agents to expose the accept_from and contribute_to as advanced settings that could be configured by users and so removing the need to make hacks. Would need some thinking about re handling upgrades where you wanted to make changes to the defaults that would pass through to the current settings but it should be straightforward enough.

When you say ‘expose the accept_from and contribute_to as advanced settings’, am I correct you’re referring to having these fields visible in the Agents settings at the user level?

If you are, which makes a great deal of sense btw, we geeks (all of us) have to remember a) there will be those who have no idea what they’re doing and really muck it up by creating circular data paths and destroying the hierarchical data flow and b) we need to keep within the Plex philosophy as much as possible. Yes, there is merit in exposing Kodi-style tweaks such as this but at what point does one stop ‘exposing tweaks’ ? Yes, that is purely a philosophical & paradigm question which I’d like to leave there and move forward.

Knowing that PMS’s mechanism does define the key elements (accepts_from and contributes_to), how do we leverage that into something which can be suggested to Engineering? Making the case of accepting data is far easier than contributing Plex-generated data to 3rd party plug-ins without the agent going through the full Framework mechanisms. This is the general use-case which needs to be addressed
 “Plex-generated data siphoned off and used elsewhere without Plex,Inc knowledge”. NOT a fun discussion to have but one that I will have to do in anything we move forward with where data is exported/contributed_to.

That having been said, How’s this for a possible solution to refine further?

  1. Relax the need for ‘accepts_from’ in existing agents. Any agent found which has ‘contributes_to’ does contribute. Such agents are deemed ‘optional agents’.
  2. Optional agents, by default, are presented in the Agent stacking order (Plex/Web UI) at the bottom until such time they are moved by the user.

My goal here is to present a formal RFE to engineering so this and other plug-ins can be created and much more easily maintained in the future.

@ChuckPa said:

My goal here is to present a formal RFE to engineering so this and other plug-ins can be created and much more easily maintained in the future.

Native support for nfo files

@anothername

Insufficient statement.

I’ve presented two design elements above.

Kindly constructively comment on them without coldly stating “Native support for nfo files”

I would add that the optional agents be unchecked by default as well. Then the user has to explicitly activate and reorder them.

@ChuckPa said:

When you say ‘expose the accept_from and contribute_to as advanced settings’, am I correct you’re referring to having these fields visible in the Agents settings at the user level?

Yes, that’s why I would put it under advanced settings (you could put it under here be monsters if you like).

If you are, which makes a great deal of sense btw, we geeks (all of us) have to remember a) there will be those who have no idea what they’re doing and really muck it up by creating circular data paths and destroying the hierarchical data flow and b) we need to keep within the Plex philosophy as much as possible. Yes, there is merit in exposing Kodi-style tweaks such as this but at what point does one stop ‘exposing tweaks’ ? Yes, that is purely a philosophical & paradigm question which I’d like to leave there and move forward.

For me it is not so much a Kodi style tweak as an indication that Plex really does want community provided code to be worth while. I guess one reason I haven’t got around to subbing is because I am concerned that in the future Plex will become more closed to such code.

Knowing that PMS’s mechanism does define the key elements (accepts_from and contributes_to), how do we leverage that into something which can be suggested to Engineering? Making the case of accepting data is far easier than contributing Plex-generated data to 3rd party plug-ins without the agent going through the full Framework mechanisms. This is the general use-case which needs to be addressed
 “Plex-generated data siphoned off and used elsewhere without Plex,Inc knowledge”. NOT a fun discussion to have but one that I will have to do in anything we move forward with where data is exported/contributed_to.
That having been said, How’s this for a possible solution to refine further?
Relax the need for ‘accepts_from’ in existing agents. Any agent found which has ‘contributes_to’ does contribute. Such agents are deemed ‘optional agents’.
Optional agents, by default, are presented in the Agent stacking order (Plex/Web UI) at the bottom until such time they are moved by the user.
My goal here is to present a formal RFE to engineering so this and other plug-ins can be created and much more easily maintained in the future.

My first reaction is that would be great first step.

However it would not help with something like Plex Theme Music. What would also be nice is if code is written in a more extensible way.
Plex Theme Music basically requires the tvdb_id but only works with ‘com.plexapp.agents.thetvdb’, ‘com.plexapp.agents.thetvdbdvdorder’, ‘com.plexapp.agents.themoviedb’ not only are they the only ones declared in contributes_to but it also has a search function that does not permit the existance of anything else. Therefore any one wanting to use it with another agent has to copy and edit the plugin. What it could have done is just test for ‘com.plexapp.agents.themoviedb’ or better still would have been if there were a way for the agent to expose to Plex Theme Music (or any other plugin) how to get the tvdb id.

@jczorkmid said:

I would add that the optional agents be unchecked by default as well. Then the user has to explicitly activate and reorder them.

That makes sense too.

Please understand, this is not going to be a “get everything at one shot” event.

My goal is to facilitate the framework change to allow this and other plug-ins a better, and easier, integration. With the first step, relaxation of the existing exclusivity as it stands now, the primary plug-in here will work, right? It is free to progress at its pace in its direction and contribute to the composite Plex experience (the desired end goal).

If you look at this software architecturally, it only needs satisfy what the existing plug-ins want. Let them deal with all the nuances of putting everything in the database with all the proper linkages. Am I wrong with leveraging this thin layer of abstraction?

Quick question, please.

I have read that XBMC exports the .nfo using a single name for movies so you normally have to make your mind up if you want to store the original or translated title.
As part of this XBMC → data migration though I generate my .nfo with a different program: ANT Movie Renamer, and have full flexibility on what to export and how to call it.
Would the XBMCnfoMoviesImport be able to understand the two different markup (whatever they are called)

<translated title>
<original title>

The idea if of course to populate the “Title” and “Original Title” respectively

Thanks!
:slight_smile:

So I don’t mean to derail the current discussion but is there any ETA on the thumbnail issue with plex at the moment?

I still haven’t seen any devs confirm the bug even exists.