# NFO agent

**URL:** <https://forums.plex.tv/t/nfo-agent/4688>\
**Category:** Dev/API Corner\
**Tags:** scanner-agent-dev\
**Created:** [September 1, 2010, 8:20pm UTC](https://forums.plex.tv/t/nfo-agent/4688 "2010-09-01T20:20:44Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![MTI](https://avatars.discourse-cdn.com/v4/letter/m/fbc32d/32.png) [@MTI](https://forums.plex.tv/u/MTI)\
**Post date:** [September 1, 2010, 8:20pm UTC](https://forums.plex.tv/t/nfo-agent/4688/1 "2010-09-01T20:20:44Z")

</div>

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](http://forums.plexapp.com/public/style_emoticons/default/smile.gif)

&nbsp;

--- Edit ---

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

---

<div class="post-metadata">

**Author:** ![hrcolb0](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/hrcolb0/32/380_2.png) [@hrcolb0](https://forums.plex.tv/u/hrcolb0)\
**Post date:** [September 1, 2010, 10:52pm UTC](https://forums.plex.tv/t/nfo-agent/4688/2 "2010-09-01T22:52:36Z")

</div>

_ **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.

---

<div class="post-metadata">

**Author:** ![MTI](https://avatars.discourse-cdn.com/v4/letter/m/fbc32d/32.png) [@MTI](https://forums.plex.tv/u/MTI)\
**Post date:** [September 2, 2010, 6:52am UTC](https://forums.plex.tv/t/nfo-agent/4688/3 "2010-09-02T06:52:05Z")

</div>

Sound great, thanks alot for your reply! 🙂  
  
  
  
Looking forward to what you might come up with! 😃

---

<div class="post-metadata">

**Author:** ![Nudgenudge](https://avatars.discourse-cdn.com/v4/letter/n/9f8e36/32.png) [@Nudgenudge](https://forums.plex.tv/u/Nudgenudge)\
**Post date:** [September 2, 2010, 4:05pm UTC](https://forums.plex.tv/t/nfo-agent/4688/4 "2010-09-02T16:05:31Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![jam](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jam/32/186050_2.png) [@jam](https://forums.plex.tv/u/jam)\
**Post date:** [September 2, 2010, 5:29pm UTC](https://forums.plex.tv/t/nfo-agent/4688/5 "2010-09-02T17:29:26Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![MTI](https://avatars.discourse-cdn.com/v4/letter/m/fbc32d/32.png) [@MTI](https://forums.plex.tv/u/MTI)\
**Post date:** [September 2, 2010, 6:12pm UTC](https://forums.plex.tv/t/nfo-agent/4688/6 "2010-09-02T18:12:22Z")

</div>

Great news, thanks alot Jam! 🙂 What turned you around?

---

<div class="post-metadata">

**Author:** ![bliblablo](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/bliblablo/32/130961_2.png) [@bliblablo](https://forums.plex.tv/u/bliblablo)\
**Post date:** [September 2, 2010, 6:30pm UTC](https://forums.plex.tv/t/nfo-agent/4688/7 "2010-09-02T18:30:59Z")

</div>

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 😉

---

<div class="post-metadata">

**Author:** ![sej7278](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@sej7278](https://forums.plex.tv/u/sej7278)\
**Post date:** [September 2, 2010, 9:47pm UTC](https://forums.plex.tv/t/nfo-agent/4688/8 "2010-09-02T21:47:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![hrcolb0](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/hrcolb0/32/380_2.png) [@hrcolb0](https://forums.plex.tv/u/hrcolb0)\
**Post date:** [September 2, 2010, 11:51pm UTC](https://forums.plex.tv/t/nfo-agent/4688/9 "2010-09-02T23:51:06Z")

</div>

> [@](#):
>
> 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!

---

<div class="post-metadata">

**Author:** ![bliblablo](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/bliblablo/32/130961_2.png) [@bliblablo](https://forums.plex.tv/u/bliblablo)\
**Post date:** [September 3, 2010, 6:37am UTC](https://forums.plex.tv/t/nfo-agent/4688/10 "2010-09-03T06:37:11Z")

</div>

> [@](#):
>
> 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 :)

---

<div class="post-metadata">

**Author:** ![sej7278](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@sej7278](https://forums.plex.tv/u/sej7278)\
**Post date:** [September 3, 2010, 7:56am UTC](https://forums.plex.tv/t/nfo-agent/4688/11 "2010-09-03T07:56:11Z")

</div>

> [@](#):
>
> 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).

---

<div class="post-metadata">

**Author:** ![hrcolb0](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/hrcolb0/32/380_2.png) [@hrcolb0](https://forums.plex.tv/u/hrcolb0)\
**Post date:** [September 4, 2010, 3:05pm UTC](https://forums.plex.tv/t/nfo-agent/4688/12 "2010-09-04T15:05:42Z")

</div>

I have custom names working now. Working on poster support with custom names.

---

<div class="post-metadata">

**Author:** ![elSpike](https://avatars.discourse-cdn.com/v4/letter/e/85f322/32.png) [@elSpike](https://forums.plex.tv/u/elSpike)\
**Post date:** [September 8, 2010, 7:07am UTC](https://forums.plex.tv/t/nfo-agent/4688/13 "2010-09-08T07:07:10Z")

</div>

Hi Harley,  
  
  
  
How is this progressing? Any chance of an alpha build to test? Happy to provide feedback.  
  
  
  
Cheers  
  
elSpike out.

---

<div class="post-metadata">

**Author:** ![sej7278](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@sej7278](https://forums.plex.tv/u/sej7278)\
**Post date:** [September 8, 2010, 11:06am UTC](https://forums.plex.tv/t/nfo-agent/4688/14 "2010-09-08T11:06:15Z")

</div>

> [@](#):
>
> 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:

---

<div class="post-metadata">

**Author:** ![bliblablo](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/bliblablo/32/130961_2.png) [@bliblablo](https://forums.plex.tv/u/bliblablo)\
**Post date:** [September 8, 2010, 4:40pm UTC](https://forums.plex.tv/t/nfo-agent/4688/15 "2010-09-08T16:40:22Z")

</div>

I just found that elen seems to be working on an nfo agent…  
  
[http://github.com/plexinc-agents/XBMCnfo.bundle/commits/master](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

---

<div class="post-metadata">

**Author:** ![hrcolb0](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/hrcolb0/32/380_2.png) [@hrcolb0](https://forums.plex.tv/u/hrcolb0)\
**Post date:** [September 9, 2010, 3:05am UTC](https://forums.plex.tv/t/nfo-agent/4688/16 "2010-09-09T03:05:58Z")

</div>

> [@](#):
>
> I just found that elen seems to be working on an nfo agent...  
> [http://github.com/pl.../commits/master](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

  
  
When I put the bundle into my plugins folder, and choose the IMDB Info provider, I see an XBMC NFO agent.

---

<div class="post-metadata">

**Author:** ![hrcolb0](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/hrcolb0/32/380_2.png) [@hrcolb0](https://forums.plex.tv/u/hrcolb0)\
**Post date:** [September 9, 2010, 3:06am UTC](https://forums.plex.tv/t/nfo-agent/4688/17 "2010-09-09T03:06:35Z")

</div>

> [@](#):
>
> 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)

---

<div class="post-metadata">

**Author:** ![hrcolb0](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/hrcolb0/32/380_2.png) [@hrcolb0](https://forums.plex.tv/u/hrcolb0)\
**Post date:** [September 9, 2010, 4:29pm UTC](https://forums.plex.tv/t/nfo-agent/4688/18 "2010-09-09T16:29:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![hrcolb0](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/hrcolb0/32/380_2.png) [@hrcolb0](https://forums.plex.tv/u/hrcolb0)\
**Post date:** [September 9, 2010, 10:04pm UTC](https://forums.plex.tv/t/nfo-agent/4688/19 "2010-09-09T22:04:29Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![bliblablo](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/bliblablo/32/130961_2.png) [@bliblablo](https://forums.plex.tv/u/bliblablo)\
**Post date:** [September 10, 2010, 6:24am UTC](https://forums.plex.tv/t/nfo-agent/4688/20 "2010-09-10T06:24:22Z")

</div>

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

[Next page](https://forums.plex.tv/t/nfo-agent/4688.md?page=2)
