# 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:** 4

<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 13, 2010, 9:37pm UTC](https://forums.plex.tv/t/nfo-agent/4688/61 "2010-09-13T21:37:33Z")

</div>

> [@](#):
>
> Not sure I follow. Wouldn't it be enough for the NFO agent to be able to return the name in the search() function? Then people who have NFOs can use the NFO agent at the highest priority, as a primary agent, and if they want they can add in some poster/art agents and perhaps others to fill in missing data.

  
  
I was spitballing on ways to get the name changed. The way you describe is ideal.

---

<div class="post-metadata">

**Author:** ![elan](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/elan/32/5_2.png) [@elan](https://forums.plex.tv/u/elan)\
**Post date:** [September 13, 2010, 9:38pm UTC](https://forums.plex.tv/t/nfo-agent/4688/62 "2010-09-13T21:38:22Z")

</div>

> [@](#):
>
> The way you describe is ideal.

  
  
Then we'll make it happen, dammit! :)

---

<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 13, 2010, 9:47pm UTC](https://forums.plex.tv/t/nfo-agent/4688/63 "2010-09-13T21:47:45Z")

</div>

> [@](#):
>
> Then we'll make it happen, dammit! :)

  
  
+1 to making it happen!

---

<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 13, 2010, 9:48pm UTC](https://forums.plex.tv/t/nfo-agent/4688/64 "2010-09-13T21:48:47Z")

</div>

Just to add/reiterate what it is I’m looking for with the NFO agent:

1. To be able to use custom names for the movie title instead of the one that was chosen automatically during scanning by matching the “moviename (year).ext” to an IMDb entry (tt# id) (that is how it works right?). For example, I have all my James Bond movies prefixed with "James Bond: " - with the current agents, they show up as Dr. No, Tomorrow Never Dies, and so on…  
2. To use custom metadata - that may include metadata from sources other than the ones Plex can “scrape” from, or metadata that have been changed “offline” to suit special needs. For example, I insert a [Disk #] in front of the plot information in the nfo files to be able to know what disk to attach before trying to play a movie.  
3. The agent should supplement online data, so if for example I wish for Plex to get online/fresh information for everything else but the plot and the title of the movie, that should be possible by commenting out parts of the .py code and by having the Plex agent prioritized lower than the NFO agent.  
4. The NFO files contain the IMDB tt ID. So, it could also be used to give the exact match for movies that can’t be matched on the basis of the filename. But that is already happening, right? On a side note, if the latter is correct, I don’t understand why some of my movies don’t get matched (e.g. Amélie)…  
  
  
  
I have ALOT of movies (1000+) for which I have spent countless of hours collecting my own customized metadata contained in NFO files. So this is also out of personal interest 🙂

---

<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 13, 2010, 9:54pm UTC](https://forums.plex.tv/t/nfo-agent/4688/65 "2010-09-13T21:54:48Z")

</div>

> [@](#):
>
> Then we'll make it happen, dammit! :)

  
  
all I need to get this done is some form of path available in search() be it through path or just .filename or something. If this happens, then I can make a custom Plex agent to add the title into the "Fix incorrect matches" results that spoecify nfo results. That is if an nfo file exists (hopefully not too much longer). Then I can parse it similarly to json objects using the new V2 framework and a new updateFromNfo() call in the plex agent. I do really dig the new xml file way more, I just wished you used non unicode titles. I do understand why, but its annoying.  
  
Also, I have no idea what my old metadata held outside of the display name, so I didn't realize this was working. Did i get that right that all this does not do at this point is change the display name?

---

<div class="post-metadata">

**Author:** ![elan](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/elan/32/5_2.png) [@elan](https://forums.plex.tv/u/elan)\
**Post date:** [September 13, 2010, 9:56pm UTC](https://forums.plex.tv/t/nfo-agent/4688/66 "2010-09-13T21:56:36Z")

</div>

> [@](#):
>
> I do really dig the new xml file way more, I just wished you used non unicode titles.

  
  
Not sure I understand, can you elaborate on this point?

---

<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 13, 2010, 9:59pm UTC](https://forums.plex.tv/t/nfo-agent/4688/67 "2010-09-13T21:59:03Z")

</div>

> [@](#):
>
> Also, I have no idea what my old metadata held outside of the display name, so I didn't realize this was working. Did i get that right that all this does not do at this point is change the display name?

  
Your current code gives me all metadata you have included xpath arguments for, except the title of the movie... :)

---

<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 13, 2010, 10:01pm UTC](https://forums.plex.tv/t/nfo-agent/4688/68 "2010-09-13T22:01:10Z")

</div>

> [@](#):
>
> Not sure I understand, can you elaborate on this point?

  
  
i need access to the mediatree item for my guid in search(). Currently in search I have access to a Movie item, and in update() I have access to a MediaTree item. Give me access to the MediaTree item in search() and it's done.

---

<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 13, 2010, 10:01pm UTC](https://forums.plex.tv/t/nfo-agent/4688/69 "2010-09-13T22:01:26Z")

</div>

> [@](#):
>
> Not sure I understand, can you elaborate on this point?

  
(THANK YOU, elan (and of course Harley) for investing some time in this!!! :D).

---

<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 13, 2010, 10:07pm UTC](https://forums.plex.tv/t/nfo-agent/4688/70 "2010-09-13T22:07:55Z")

</div>

Don’t you guys use unicode encoded names for the xml bundles? I understand why they are used, just wish I new what files are on my comp, and what each one does. Unicode names make that hard to do.

---

<div class="post-metadata">

**Author:** ![elan](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/elan/32/5_2.png) [@elan](https://forums.plex.tv/u/elan)\
**Post date:** [September 13, 2010, 10:21pm UTC](https://forums.plex.tv/t/nfo-agent/4688/71 "2010-09-13T22:21:26Z")

</div>

> [@](#):
>
> i need access to the mediatree item for my guid in search()

  
  
I understood this point, just didn't understand "I just wished you used non unicode titles" :)

---

<div class="post-metadata">

**Author:** ![kcmedic](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/kcmedic/32/510_2.png) [@kcmedic](https://forums.plex.tv/u/kcmedic)\
**Post date:** [September 14, 2010, 3:27am UTC](https://forums.plex.tv/t/nfo-agent/4688/72 "2010-09-14T03:27:37Z")

</div>

Just installed and it seems to be working for me, but it’s pulling the “overview” instead of the “plot” info. Is there any way to change this? It’s not a huge deal (because at least now I can go in and make it say whatever I want), but the overview info is a bit short. Thanks all for the work on this, we’re much closer than I expected at this point!

---

<div class="post-metadata">

**Author:** ![quasicom](https://avatars.discourse-cdn.com/v4/letter/q/d26b3c/32.png) [@quasicom](https://forums.plex.tv/u/quasicom)\
**Post date:** [September 14, 2010, 7:15am UTC](https://forums.plex.tv/t/nfo-agent/4688/73 "2010-09-14T07:15:33Z")

</div>

+1 to hoping it happen!   
  
Thanks for a great app!!!

---

<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 14, 2010, 7:46am UTC](https://forums.plex.tv/t/nfo-agent/4688/74 "2010-09-14T07:46:10Z")

</div>

> [@](#):
>
> Just installed and it seems to be working for me, but it's pulling the "overview" instead of the "plot" info. Is there any way to change this? It's not a huge deal (because at least now I can go in and make it say whatever I want), but the overview info is a bit short. Thanks all for the work on this, we're much closer than I expected at this point!

  
Change this line:  
  

```auto

try: metadata.summary = nfoXML.xpath('./outline')[0].text

```

  
  
to this:  
  

```auto

try: metadata.summary = nfoXML.xpath('./plot')[0].text

```

  
  
(exchange "outline" for "plot").  
  
:)

---

<div class="post-metadata">

**Author:** ![kcmedic](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/kcmedic/32/510_2.png) [@kcmedic](https://forums.plex.tv/u/kcmedic)\
**Post date:** [September 14, 2010, 3:32pm UTC](https://forums.plex.tv/t/nfo-agent/4688/75 "2010-09-14T15:32:53Z")

</div>

> [@](#):
>
> Change this line:  
>   
> 
> ```auto
> 
> try: metadata.summary = nfoXML.xpath('./outline')[0].text
> 
> ```
> 
>   
>   
> to this:  
>   
> 
> ```auto
> 
> try: metadata.summary = nfoXML.xpath('./plot')[0].text
> 
> ```
> 
>   
>   
> (exchange "outline" for "plot").  
>   
> :)

  
Worked like a charm, thanks!

---

<div class="post-metadata">

**Author:** ![ussalaska](https://avatars.discourse-cdn.com/v4/letter/u/46a35a/32.png) [@ussalaska](https://forums.plex.tv/u/ussalaska)\
**Post date:** [September 14, 2010, 7:44pm UTC](https://forums.plex.tv/t/nfo-agent/4688/76 "2010-09-14T19:44:10Z")

</div>

Getting closer thanks for all the hard work. I tried to get it to the agent to return genre with no success, I know genre is broken with the scrapers but is it possible to get working with the .nfo agent  
  
  
  
Chris

---

<div class="post-metadata">

**Author:** ![p.plex.px](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@p.plex.px](https://forums.plex.tv/u/p.plex.px)\
**Post date:** [September 15, 2010, 3:23pm UTC](https://forums.plex.tv/t/nfo-agent/4688/77 "2010-09-15T15:23:58Z")

</div>

shold this work with PLEX Media Server 0.9.9.21?  
  
I put the XBMCnfo.bundle file into:  
  
/Library/Application Support/Plex Media Server/Plug-ins  
  
I’ve restarted the Server several times but I can’t see the provider:  
  
  
  
Section Type: Movies  
  
Media scanner: Plex Movie Scanner  
  
Primary info provider: IMDB (or Home Movies)  
  
  
  
any idea?

---

<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 15, 2010, 3:37pm UTC](https://forums.plex.tv/t/nfo-agent/4688/78 "2010-09-15T15:37:37Z")

</div>

> [@](#):
>
> shold this work with PLEX Media Server 0.9.9.21?  
> I put the XBMCnfo.bundle file into:  
> /Library/Application Support/Plex Media Server/Plug-ins  
> I've restarted the Server several times but I can't see the provider:  
>   
> Section Type: Movies  
> Media scanner: Plex Movie Scanner  
> Primary info provider: IMDB (or Home Movies)  
>   
> any idea?

  
  
You should see it inside as a choice within imdb/plex info provider.

---

<div class="post-metadata">

**Author:** ![RichardS](https://avatars.discourse-cdn.com/v4/letter/r/7ba0ec/32.png) [@RichardS](https://forums.plex.tv/u/RichardS)\
**Post date:** [September 15, 2010, 4:06pm UTC](https://forums.plex.tv/t/nfo-agent/4688/79 "2010-09-15T16:06:14Z")

</div>

> [@](#):
>
> You should see it inside as a choice within imdb/plex info provider.

  
  
  
Hi Harley  
  
Following the discussion a couple of days and would like to participate in the testing. Latest version of your XBMCinfo.bundle.zip is dated 12.09.10. After above positive comments and proposals for amendments I think there might be a newer version. Can you add this latest version in this section?  
Actually I can scan with version 12.09.10 my individual posters and tbn.folders and also the individual title of the movie shows up.  
Only exception are titles with foreign characters like the German ü, ä, ö, but this might be a general problem of PLEX 9 to be solved at a later stage.

---

<div class="post-metadata">

**Author:** ![p.plex.px](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@p.plex.px](https://forums.plex.tv/u/p.plex.px)\
**Post date:** [September 15, 2010, 4:23pm UTC](https://forums.plex.tv/t/nfo-agent/4688/80 "2010-09-15T16:23:03Z")

</div>

> [@](#):
>
> You should see it inside as a choice within imdb/plex info provider.

  
  
hmm, don't even have the 'plex info provider' (but had it some time ago)

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

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