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

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

</div>

> [@](#):
>
> Just wanted to let you know that James has fixed the bug around the name, so as soon as we push a new framework update you'll be able to get the name in the search() function.

  
  
So is the fix designed to show the results.append(blahblahblah) in the "Fix incorrect match" search results? I still have the issue of xbmcnfo not running until after I choose a name. This means that the agent would not have the ability to run before the list is populated. Or will it allow for the filepath to be exposed in search()? I think running a scanner as a one off when you first import data might also fix the problem. Working on learning git now, but I think I can whip this up tonight.

---

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

</div>

Awesome work being done here! If you guys wouldn’t mind, please push changes over to Github so that i can merge them back in.

---

<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 16, 2010, 11:25pm UTC](https://forums.plex.tv/t/nfo-agent/4688/103 "2010-09-16T23:25:46Z")

</div>

updated genres. and once I figure out how to upload to git, I’ll put it in. Isaac was telling me how to do it last night for one of my plugins.

---

<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 16, 2010, 11:37pm UTC](https://forums.plex.tv/t/nfo-agent/4688/104 "2010-09-16T23:37:25Z")

</div>

> [@](#):
>
> Awesome work being done here! If you guys wouldn't mind, please push changes over to Github so that i can merge them back in.

  
  
  
Whenever I try to clone your bundle, and any plex bundle, it tell me that permission is denied. Any git hints?

---

<div class="post-metadata">

**Author:** ![dawiinci](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dawiinci/32/1301_2.png) [@dawiinci](https://forums.plex.tv/u/dawiinci)\
**Post date:** [September 17, 2010, 12:21am UTC](https://forums.plex.tv/t/nfo-agent/4688/105 "2010-09-17T00:21:02Z")

</div>

> [@](#):
>
> updated genres. and once I figure out how to upload to git, I'll put it in. Isaac was telling me how to do it last night for one of my plugins.

  
  
I just tried the plugin and it now finds genres for my movies. Unfortunately as Chris3452 already said only one genre is accepted. (separated by , ; / or space)  
  
It is still not possible to get info from the .nfo if the movie isn't found by clicking "fix incorrect match". But I think this is fixed by James as elan wrote a few hours ago. - I hope so. :)  
  
Thanks a lot. I will test more tomorrow.

---

<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 17, 2010, 12:45am UTC](https://forums.plex.tv/t/nfo-agent/4688/106 "2010-09-17T00:45:59Z")

</div>

It’s been gitted, gotten, gitten?   
  
  
  
  
  
  
  
Pull request sent.  
  
  
  
@dawiinci: Your log shows every genre was added (Added genre: xxx) but only one genre is available in the movie info?

---

<div class="post-metadata">

**Author:** ![dawiinci](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dawiinci/32/1301_2.png) [@dawiinci](https://forums.plex.tv/u/dawiinci)\
**Post date:** [September 17, 2010, 9:53am UTC](https://forums.plex.tv/t/nfo-agent/4688/107 "2010-09-17T09:53:28Z")

</div>

> [@](#):
>
> @dawiinci: Your log shows every genre was added (Added genre: xxx) but only one genre is available in the movie info?

  
  
The problem is that it handles "Action, Adventure" as one genre instead of two. But maybe I just have to write it different.  
  

```auto

2010-09-17 11:48:26,893 (-4faed000) : INFO ( __init__ ) - Added genre: Comedy, Action<br />

```

---

<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 17, 2010, 10:01am UTC](https://forums.plex.tv/t/nfo-agent/4688/108 "2010-09-17T10:01:39Z")

</div>

> [@](#):
>
> The problem is that it handles "Action, Adventure" as one genre instead of two. But maybe I just have to write it different.  
>   
> 
> ```auto
> 
> 2010-09-17 11:48:26,893 (-4faed000) : INFO ( __init__ ) - Added genre: Comedy, Action<br />
> 
> ```

  
In the NFO, try changing the delimiter to "/", i.e. "Action / Crime"  
  
Or change this line in the agent code:  
  

```auto

genres=tempgenre.split("/")

```

  
  
to suit your needs, e.g. in your case:  
  

```auto

genres=tempgenre.split(", ")

```

---

<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 17, 2010, 10:32am UTC](https://forums.plex.tv/t/nfo-agent/4688/109 "2010-09-17T10:32:37Z")

</div>

Harley, I get this

```auto

CRITICAL (core) - Exception in the update function of agent named 'XBMC .nfo Importer', called with guid

```

  
  
  
and this  
  

```auto

~/Library/Application Support/Plex Media Server/Plug-ins/XBMCnfo.bundle/Contents/Code/ __init__.py", line 39, in update<br />
    (id, metadata)=self.scrapeNfo(metadata, media, lang)

```

  
  

```auto

~/Library/Application Support/Plex Media Server/Plug-ins/XBMCnfo.bundle/Contents/Code/ __init__.py", line 125, in scrapeNfo<br />
    data = HTTP.Request(nfoXML.xpath('./thumb')[0].text)

```

  
  
  
This is in the part of the code that deals with actor thumbs. In my limited testing, it seems that the code causes an exception when it meets the first actor entry that does not contain a element.  
  
Can you fix that? :)  
  
Also, it doesn't seem that the Plex client displays the actor info (in the extended movie info ("i")/ the Cast tab).

---

<div class="post-metadata">

**Author:** ![dawiinci](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/dawiinci/32/1301_2.png) [@dawiinci](https://forums.plex.tv/u/dawiinci)\
**Post date:** [September 17, 2010, 12:17pm UTC](https://forums.plex.tv/t/nfo-agent/4688/110 "2010-09-17T12:17:07Z")

</div>

> [@](#):
>
> In the NFO, try changing the delimiter to "/", i.e. "Action / Crime"  
>   
> Or change this line in the agent code:  
>   
> 
> ```auto
> 
> genres=tempgenre.split("/")
> 
> ```
> 
>   
>   
> to suit your needs, e.g. in your case:  
>   
> 
> ```auto
> 
> genres=tempgenre.split(", ")
> 
> ```

  
Thanks that's what caused the problem. I now change all to Action/Comedy (without spaces). I think with spaces there would be probably duplicates like \_Action and Action.

---

<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 18, 2010, 2:21am UTC](https://forums.plex.tv/t/nfo-agent/4688/111 "2010-09-18T02:21:51Z")

</div>

> [@](#):
>
> Harley, I get this  
>   
> 
> ```auto
> 
> CRITICAL (core) - Exception in the update function of agent named 'XBMC .nfo Importer', called with guid
> 
> ```
> 
>   
>   
>   
> and this  
>   
> 
> ```auto
> 
> ~/Library/Application Support/Plex Media Server/Plug-ins/XBMCnfo.bundle/Contents/Code/ __init__.py", line 39, in update<br />
> (id, metadata)=self.scrapeNfo(metadata, media, lang)
> 
> ```
> 
>   
>   
> 
> ```auto
> 
> ~/Library/Application Support/Plex Media Server/Plug-ins/XBMCnfo.bundle/Contents/Code/ __init__.py", line 125, in scrapeNfo<br />
> data = HTTP.Request(nfoXML.xpath('./thumb')[0].text)
> 
> ```
> 
>   
>   
>   
> This is in the part of the code that deals with actor thumbs. In my limited testing, it seems that the code causes an exception when it meets the first actor entry that does not contain a element.  
>   
> Can you fix that? :)  
>   
> Also, it doesn't seem that the Plex client displays the actor info (in the extended movie info ("i")/ the Cast tab).

  
  
  
MTI: i've started using github for tracking of my apps and agents. go to this link, http://github.com/HooliganHarls/XBMCnfo.bundle and look in the top right for the "download source" link. I have updated so it should not crash on no thumbs present.

---

<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 18, 2010, 6:34am UTC](https://forums.plex.tv/t/nfo-agent/4688/112 "2010-09-18T06:34:15Z")

</div>

> [@](#):
>
> MTI: i've started using github for tracking of my apps and agents. go to this link, [http://github.com/Ho.../XBMCnfo.bundle](http://github.com/HooliganHarls/XBMCnfo.bundle) and look in the top right for the "download source" link. I have updated so it should not crash on no thumbs present.

  
Cool, thanks :)  
  
I'm off to a wedding - will take a look Sunday.

---

<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 19, 2010, 9:31am UTC](https://forums.plex.tv/t/nfo-agent/4688/113 "2010-09-19T09:31:33Z")

</div>

Has anyone had a look at modifying this to do TV shows as well?  
  
  
  
If not I’ll give it a crack.

---

<div class="post-metadata">

**Author:** ![mkh](https://avatars.discourse-cdn.com/v4/letter/m/4af34b/32.png) [@mkh](https://forums.plex.tv/u/mkh)\
**Post date:** [September 19, 2010, 9:45am UTC](https://forums.plex.tv/t/nfo-agent/4688/114 "2010-09-19T09:45:10Z")

</div>

> [@](#):
>
> Has anyone had a look at modifying this to do TV shows as well?  
>   
> If not I'll give it a crack.

  
  
  
That would be awsome, got alot of Danish TV shows which are on http://thetvdb.com but not being added since we can only search for english shows :((((  
  
  
Oh well, just found this -\> http://oncleben31.cc/en/2010/09/multilingual-metadata-agent-thetvdb-for-plex-9/  
but be aware, it might crash the PMM if using "fix incorret match" on tv shows... it sure does here :D

---

<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 21, 2010, 11:04am UTC](https://forums.plex.tv/t/nfo-agent/4688/115 "2010-09-21T11:04:56Z")

</div>

Has the framework update that will allow for custom names been pushed? 🙂

---

<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 21, 2010, 11:15am UTC](https://forums.plex.tv/t/nfo-agent/4688/116 "2010-09-21T11:15:25Z")

</div>

> [@](#):
>
> but be aware, it might crash the PMM if using "fix incorret match" on tv shows... it sure does here :D

  
  
The internationalized agent has been officially pushed to the store. If you're seeing a crash from it (not this one), I'd like to hear about it and get a crash report :)

---

<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 21, 2010, 11:26am UTC](https://forums.plex.tv/t/nfo-agent/4688/117 "2010-09-21T11:26:12Z")

</div>

> [@](#):
>
> The internationalized agent has been officially pushed to the store. If you're seeing a crash from it (not this one), I'd like to hear about it and get a crash report :)

  
  
And the framework update that will allow Harley's agent to use the name of the movie embedded in the NFO file - that has not been pushed? :)

---

<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 21, 2010, 11:27am UTC](https://forums.plex.tv/t/nfo-agent/4688/118 "2010-09-21T11:27:44Z")

</div>

> [@](#):
>
> And the framework update that will allow Harley's agent to use the name of the movie embedded in the NFO file - that has not been pushed? :)

  
  
Not yet, we're still testing it :)

---

<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 21, 2010, 11:27am UTC](https://forums.plex.tv/t/nfo-agent/4688/119 "2010-09-21T11:27:50Z")

</div>

> [@](#):
>
> Has anyone had a look at modifying this to do TV shows as well?  
>   
> If not I'll give it a crack.

  
  
if you need help, let me know.

---

<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 21, 2010, 11:30am UTC](https://forums.plex.tv/t/nfo-agent/4688/120 "2010-09-21T11:30:18Z")

</div>

> [@](#):
>
> Not yet, we're still testing it :)

  
  
:) OK

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

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