Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

NFO agent

MTIMTI Posts: 492Members
Metadata agent to gather info from local nfo files

Is anybody with more coding capability than me able to code a metadata agent that will gather metadata from local xml-formatted nfo files. For me, the most important element is "title"

I've spend a lot of time perfecting the titles of my movies, for example all James Bond movies that I have is named "James Bond: Die Another Day", "James Bond: Goldfinger" and so on... Currently they are named "Die Another Day", "Goldfinger" by the Media Manager.

Any help is highly appreciated... smile.gif

 

--- Edit ---

More up to date info: http://forums.plexapp.com/index.php/topic/38402-metadata-agents-for-exported-xbmc-library

«13456720

Comments

  • hrcolb0hrcolb0 Posts: 1,239Members ✭✭
    edited October 2010
    Claimed in the name of Version Control

    This is for the XBMCnfo varients:

    Current Variants
    Movie Info Provider (Primary Agent)
    Movie Agent (Secondary Agent)
    TV Show Info Provider



    Current Versions
    Movie Info Provider: 2.0
    Movie Agent: 1.0
    TV Show Info Provider: 1.0



    Current Features
    Movie Info Provider:
    -Load .nfo data as primary metadata for movie item.
    -Customize display names
    -Customize metadata
    -Load metadata for movie files without IMDB id's

    Movie Agent:
    -Customize display names
    -Customize metadata

    TV Info Provider:
    -Load .nfo data as primary metadata for tv show and episodes.
    -Customize display names
    -Customize metadata
    -Load metadata for tv shows and episodes not found with other Primary info providers


    Original post
    I hadn't thought of that as a way. I have a 3 day weekend thanks to the holiday. If I can find the time, that's a great idea. should just be as simple as looking at file:/// instead of http:// and then some tweaking to call the right stuff. Great workaround idea, MTI.
  • MTIMTI Posts: 492Members
    Sound great, thanks alot for your reply! :)

    Looking forward to what you might come up with! :D
  • NudgenudgeNudgenudge Master Synology Engineer Posts: 293Members
    A couple of things I spotted yesterday:
    - there seems to be a "Local Files" bundle. It must be for posters and the like, but it could be a good basis.
    - also, if you're trying to access local files, use os.path in Python. It will be easier than "remote" access to file:// (does it work on Mac? I have to say I never tried).
  • jamjam Plex Dev Team Posts: 4,292Members, Plex Employee, Plex Pass Plex Employee
    There is already an NFO agent in development. It won't be officially supported by the team, or bundled with the releases, but it'll be up on the wiki shortly when the kinks are worked out :)
  • MTIMTI Posts: 492Members
    Great news, thanks alot Jam! :) What turned you around?
  • bliblablobliblablo Posts: 27Members, Plex Pass Plex Pass
    edited September 2010
    Great :) Looking forward to it as I have nfo proper (at least in my opinion ;) ) nfo file for 400 movies or so and scanning them again wouldn't really be funny ;)
  • sej7278sej7278 Posts: 158Members
    looking forward to the nfo agent, the original xbmc guys always said it would be a bad idea due to slowness, but i can't see reading a file can be slower than connecting to imdb or sqlite.

    even if the nfo just had the imdb title number, it would be a good way to fix false-positive scrapes, then perhaps the imdb scraper could update the nfo file with the full metadata.
  • hrcolb0hrcolb0 Posts: 1,239Members ✭✭
    jedi wrote on 02 September 2010 - 10:47 PM:

    looking forward to the nfo agent, the original xbmc guys always said it would be a bad idea due to slowness, but i can't see reading a file can be slower than connecting to imdb or sqlite.

    even if the nfo just had the imdb title number, it would be a good way to fix false-positive scrapes, then perhaps the imdb scraper could update the nfo file with the full metadata.


    The local agent works as billed, and I found out today that I shouldn't have to do much real work this weekend. Looking forward to 3 days sitting around in my saggy tighty whities watching Plex 9! w00t!
  • bliblablobliblablo Posts: 27Members, Plex Pass Plex Pass
    jedi wrote on 02 September 2010 - 10:47 PM:

    looking forward to the nfo agent, the original xbmc guys always said it would be a bad idea due to slowness, but i can't see reading a file can be slower than connecting to imdb or sqlite.

    even if the nfo just had the imdb title number, it would be a good way to fix false-positive scrapes, then perhaps the imdb scraper could update the nfo file with the full metadata.


    For me the thing is that i'm not native english and so getting data form the imdb link in the nfo file would bring get english description again :)
    This is why i would love to see it just taking all the information i already have in my nfo file :)
  • sej7278sej7278 Posts: 158Members
    bliblablo wrote on 03 September 2010 - 07:37 AM:

    For me the thing is that i'm not native english and so getting data form the imdb link in the nfo file would bring get english description again :)
    This is why i would love to see it just taking all the information i already have in my nfo file :)


    yes, or maybe the ability to manually edit the scraped metadata would fix that too (which apparently is coming in the future).
  • hrcolb0hrcolb0 Posts: 1,239Members ✭✭
    I have custom names working now. Working on poster support with custom names.
  • elSpikeelSpike Posts: 2Members
    Hi Harley,

    How is this progressing? Any chance of an alpha build to test? Happy to provide feedback.

    Cheers
    elSpike out.
  • sej7278sej7278 Posts: 158Members
    edited September 2010
    elSpike wrote on 08 September 2010 - 08:07 AM:
    How is this progressing? Any chance of an alpha build to test? Happy to provide feedback.


    i'd have thought we've all had enough of alpha builds for this month! :lol:
  • bliblablobliblablo Posts: 27Members, Plex Pass Plex Pass
    I just found that elen seems to be working on an nfo agent...
    http://github.com/plexinc-agents/XBMCnfo.bundle/commits/master
    I just downloaded the bundle and wanted to try out my own python coding skills again :)

    Just a few questions on how i can get started... (I didn't find any info about writing agents in the dev part of the plex website)

    I have to place the .bundle file into ~/Library/Application Support/Plex Media Server/Plug-ins, right?
    But how can i setup the Media Server to use this agent?
    When i add a new section that i want to test with the changes i make I can only choose:

    Media Scanner: Plex Movie Scanner
    Primary info provider: IMDB or Home Movies
    Language: English

    That's all i can add ?!? Is that normal? Where can i choose that it should take the new agent as a scanner? (Or am I totally wrong on how all the scraping works??? Any further readings that you can recommend?)

    Furthermore... is there any way i can see console output if i put any print commands into the python code for debugging?
    There seems to be a "metadata" object that i need to append all the data that i can collect to, right? Is there any documentation on the properties that i has?
    Maybe there are some other developers out there working on the same codebase. Would be nice if we could team up and get this XBMC NFO agent on his feet :)
    Just PM me... i'd be happy to help at least a little bit to make Plex even more kick ass as it already is ;)

    cheers
  • hrcolb0hrcolb0 Posts: 1,239Members ✭✭
    bliblablo wrote on 08 September 2010 - 12:40 PM:

    I just found that elen seems to be working on an nfo agent...
    http://github.com/pl.../commits/master
    I just downloaded the bundle and wanted to try out my own python coding skills again :)

    Just a few questions on how i can get started... (I didn't find any info about writing agents in the dev part of the plex website)

    I have to place the .bundle file into ~/Library/Application Support/Plex Media Server/Plug-ins, right?
    But how can i setup the Media Server to use this agent?
    When i add a new section that i want to test with the changes i make I can only choose:

    Media Scanner: Plex Movie Scanner
    Primary info provider: IMDB or Home Movies
    Language: English

    That's all i can add ?!? Is that normal? Where can i choose that it should take the new agent as a scanner? (Or am I totally wrong on how all the scraping works??? Any further readings that you can recommend?)

    Furthermore... is there any way i can see console output if i put any print commands into the python code for debugging?
    There seems to be a "metadata" object that i need to append all the data that i can collect to, right? Is there any documentation on the properties that i has?
    Maybe there are some other developers out there working on the same codebase. Would be nice if we could team up and get this XBMC NFO agent on his feet :)
    Just PM me... i'd be happy to help at least a little bit to make Plex even more kick ass as it already is ;)

    cheers


    When I put the bundle into my plugins folder, and choose the IMDB Info provider, I see an XBMC NFO agent.
  • hrcolb0hrcolb0 Posts: 1,239Members ✭✭
    elSpike wrote on 08 September 2010 - 03:07 AM:

    Hi Harley,

    How is this progressing? Any chance of an alpha build to test? Happy to provide feedback.

    Cheers
    elSpike out.


    covered in another thread. (extra menu thread)
  • hrcolb0hrcolb0 Posts: 1,239Members ✭✭
    I almost have elan's xbmc nfo agent done. I only need to get the metadata to post to the media manager. I'll post it when it's done. You can't rename movies freely like you'll be able to with the truely integrated approach, but this will get you back to 8.5 movie names.
  • hrcolb0hrcolb0 Posts: 1,239Members ✭✭
    edited September 2010
    Alright, everyone. I'm punting. Here is the updated xbmcnfo.agent. Elan told me that the results need to be passed through the search function call, but I cannot get the search subroutine to run. If anyone else wants to give it a whack, here you go.

    The only thing that needs to be done for this is that the results need to be passed to Media Manager. I you check the Log file for the agent, you will see that it is pulling the correct information.

    I strongly suggest trialing this on a single movie for whomever is brave enough. You don't want to bork your entire db because you got cocky.
  • bliblablobliblablo Posts: 27Members, Plex Pass Plex Pass
    Great...
    I would love to help you on this one but still i don't get where I can choose that Plex is using your new agent...
    I placed the .bundle file in ~/Library/Application Support/Plex Media Server/Plug-ins, right? I also restarted Plex and the Media Server.
    But where should i be able to choose it? Is there anything i have to enable first? I don't have any dropdown where i can choose it. Not even if i go to "Info Provider Settings"...
    Is there any further documentation on how i can get this working?
    Thanks
  • MTIMTI Posts: 492Members
    Great, Harley! Testing it asap - hope that the devs will chime in and help with the missing piece...! :)

    Good work!
«13456720
This discussion has been closed.