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

<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 11, 2010, 6:58am UTC](https://forums.plex.tv/t/nfo-agent/4688/41 "2010-09-11T06:58:08Z")

</div>

Harley, looking forward to it 🙂  
  
  
  
BTW, I just tried to express that I felt that it would be welcome if the official devs would invest some time in this issue. Your “unofficial” efforts are greatly appreciated, though! 🙂  
  
  
  
(I’m offline most of this weekend, so I can’t help you test before late Sunday).

---

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

</div>

forgot to turn my alarm off. oops. so, back at 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 11, 2010, 1:31pm UTC](https://forums.plex.tv/t/nfo-agent/4688/43 "2010-09-11T13:31:32Z")

</div>

I am done with it. I’m going back to getting my plugins app store ready. For the life of me I cannot figure out how to add the scanned results into the search() function. If anyone else wants to take a look, the best code I have has already been posted.  
  
  
  
according to elan:  
  
  
  
“The title _must_ be set in the search() function, not in update(). This stems historically from an issue where a piece of media might have various names, and the user picks one in the search area (via fix match, usually). As long as you pass back the title from search(), the Media Manager should use it.”  
  
  
  
This is above my current paygrade. sorry to not get you guys all the way. Hope you enjoy the updated NBC plugin. I have more coming soon, now that I have gotten my butt kick by a search function.

---

<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 11, 2010, 4:55pm UTC](https://forums.plex.tv/t/nfo-agent/4688/44 "2010-09-11T16:55:45Z")

</div>

> [@](#):
>
> This is how it looks for me... :( No XBMCnfo :(

  
  
Does nobody have a solution on how i can test your nfo agent????  
It's just not showing up in Plex Media Server... :(

---

<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 11, 2010, 5:20pm UTC](https://forums.plex.tv/t/nfo-agent/4688/45 "2010-09-11T17:20:01Z")

</div>

download the file. place it in your plug-ins folder. quit PMS. Quit Plex. Restart Plex, which restarts PMS. You should then be able to select it under the IMDB Info Provider.

---

<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 12, 2010, 1:05pm UTC](https://forums.plex.tv/t/nfo-agent/4688/46 "2010-09-12T13:05:50Z")

</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 :)

  
So, despite the great efforts by Harley Hooligan, the current code does not work. :o  
  
And nothing is up on the wiki as promised a while ago - any progress being made by the official devs? :)

---

<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 12, 2010, 1:53pm UTC](https://forums.plex.tv/t/nfo-agent/4688/47 "2010-09-12T13:53:23Z")

</div>

still not working.

---

<div class="post-metadata">

**Author:** ![oncleben31](https://avatars.discourse-cdn.com/v4/letter/o/838e76/32.png) [@oncleben31](https://forums.plex.tv/u/oncleben31)\
**Post date:** [September 12, 2010, 2:09pm UTC](https://forums.plex.tv/t/nfo-agent/4688/48 "2010-09-12T14:09:39Z")

</div>

> [@](#):
>
> And nothing is up on the wiki as promised a while ago - any progress being made by the official devs? :)

  
  
I'm not as busy as Dev are and I can guaranty that analysing, debuging, reading/writing on the forum don't allow us to write some documentation. The plugin are in Python, the API is not complicated and existing metadata agent are readable to learn. You can browse the framework bundle. All the Objects and classes are coded here.  
  
  
Be patient and help yourself :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 12, 2010, 6:54pm UTC](https://forums.plex.tv/t/nfo-agent/4688/49 "2010-09-12T18:54:06Z")

</div>

just an update to say I’m back on it, and making a little progress.

---

<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 12, 2010, 8:54pm UTC](https://forums.plex.tv/t/nfo-agent/4688/50 "2010-09-12T20:54:55Z")

</div>

Sounds good. And this has become even more relevant, as a working NFO agent would be a workaround for getting IMDB metadata into Alexandria… 🙂

---

<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 12, 2010, 8:58pm UTC](https://forums.plex.tv/t/nfo-agent/4688/51 "2010-09-12T20:58:51Z")

</div>

Here’s where I am at. It is extremely verbose, and I still don’t know why I cannot add an item to the search results. Still working.

---

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

</div>

Well, under the current Framework I do not think this is possible.  
  
  
  
The way that I think the InfoProvider section works is this:

1. PMM searches for your for your movie based on the title in your filename.  
  
-Originally this was done on IMDB  
  
-Now IMDB through Google or google itself. Not really sure, nor is it important to this discussion  
2. Media Manager populates a list for you based solely on these results  
  
-Each item on the list is basically a link to a webpage (google,bing,imdb)  
3. If you select the movie name now, it will then update by calling agent.imdb.update()  
  
-This gets the rest of the metadata since you’ve already chosen a, what we’ll call a “display name”  
  
-I think that all agents are actually updated during this function call, as xbmcnfo.log updates during this time.  
4. If you select “search” instead of this movie, only the imdb.search() function is called.  
  
Which then puts you back to sqaure one.  
5. The same as 3 happens when you choose “Select Movie” after searching  
  
  
  
Note: Nowhere in that workflow is there an opportunity for xbmcnfo.bundle to input a name into the search box list  
  
  
  
  
  
For those who understand agents:  
  
  
  
I am looking to get the file path in my agents Search() call. then this can all be fixed. Right now when I call media.filename in search() I get a value of ‘None’.   
  
  
  
Here is my last code until I hear that the workflow is actually different than what I described. I may very well be wrong. I hope I am. I’ve read the api, all of the other agents, and looked at all the other agents logs. I have not seen in one of them a way to inject a list item into the list box that slides down when you choose “Fix Incorrect Match”. I hope I have missed how to do this.

---

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

</div>

Harley with your recent code, I’m able to get most of my prescraped metadata (in nfo files) into the library. Awesome…! 🙂  
  
  
  
It could use some clean-up and I don’t get actors, genre, writers data scraped. I was able to add studio, tagline, and I’ve exchanged outline/plot so that the summary uses the plot element.  
  
  
  
Is what you detail above related to the fact that we cannot use this agent to change the title of the movie?

---

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

</div>

Hey Harley, I’ll discuss with Jam and see if we need to make a fix/enhancement to allow access to the media in search().

---

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

</div>

@elan: so will that fix/enhancement allow the nfo agent to insert another title instead of the one that currently gets “chosen” automagically?

---

<div class="post-metadata">

**Author:** ![MrAcid](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/mracid/32/278_2.png) [@MrAcid](https://forums.plex.tv/u/MrAcid)\
**Post date:** [September 13, 2010, 8:31pm UTC](https://forums.plex.tv/t/nfo-agent/4688/56 "2010-09-13T20:31:12Z")

</div>

Now your just asking questions for the sake of asking questions… He says they’ll discuss exactly that.

---

<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, 8:41pm UTC](https://forums.plex.tv/t/nfo-agent/4688/57 "2010-09-13T20:41:30Z")

</div>

What I meant to say (and I’m truly sorry about the outburst) was:  
  
  
  
You might be right that the question was answered - but if so, it was answered in such a technical way that I did not understand it. Judging my questions as “question for the sake of questions” on such limited ground was not called for! :huh:

---

<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, 8:43pm UTC](https://forums.plex.tv/t/nfo-agent/4688/58 "2010-09-13T20:43:15Z")

</div>

deleted

---

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

</div>

elan and james if reading this…what about a scanner for the names. Ideally yes, it would be included in the Plex Info provider, or maybe I make this an XBMC info provider similar to cinepassion. Lots of options, just would like the the nfo name to show up when I pick Fix Incorrect match.

---

<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:35pm UTC](https://forums.plex.tv/t/nfo-agent/4688/60 "2010-09-13T21:35:41Z")

</div>

> [@](#):
>
> elan and james if reading this...what about a scanner for the names. Ideally yes, it would be included in the Plex Info provider, or maybe I make this an XBMC info provider similar to cinepassion. Lots of options, just would like the the nfo name to show up when I pick Fix Incorrect match.

  
  
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.

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

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