NFO agent



Thanks to **Harley **and the **MTI **for the great work!

**MTI **I'm using your version and everything works fine (Plex Manager uses the .nfo created **by Ember Media Manager**).

But unfortunately it does not work for TV Shows (does not use the NFO created by Ember).

Any suggestions?


I had issues getting the TV show one to work; I can't remember the exact reasons why but after fixing the errors locally and the metadata not being updated (as it turns out, seemingly due to a bug with date-based episodes), I just wrote my own NFO reader. I posted it [here](https://github.com/ndevenish/Plex-ReadNFO) if you are interested/want to give it a try; It's a little rough around the edges (required a tvshow.nfo and a poster.jpg in the TV show base folder) but if you are stuck for other things to try it might help you.

Disclaimer: In no way a finished product.

**misnomer **thank you for responding. :)

I would like more information on how to use your code so that it imports the NFO file (created by Ember Media Manager).

And again, thank you!

Hi Everybody,



after trying to get any of the recently posted nfo agents without any success, I’m totally lost. I now want to start from scratch, but I have problems to get rid of all the agents.



I have deleted all Folders in the Plug-Ins Folder (I used: Movie NFO.bundle from #354 & NFO (Movie).bundle from #330). I also deleted all entries in the Movies.xml located in \Metadata Combination\com.plexapp.agents.imdb & com.plexapp.agents.none. I tought, thats all I have to do to start from scratch, but:



This is what I still have (after reboot of Server:


http://www.die-bonns.de/photos/Plex/Plex_1.JPG


http://www.die-bonns.de/photos/Plex/Plex_2.JPG

.



What should I do to clean my list from the two agents?



Thanks a lot in advance for your support ,-)



myhtpc





BTW: I use the Windows version

does anybody have an idea?

I still hope, that anybody can help me :wink:

I’ve been unable to get the nfo agents to work as well on Version 0.9.5.2-bf472e4. I’ve installed all of the bundles listed in this thread and put them at the top of the list hierarchically, but it still doesn’t pick up any of the custom info I have in my nfo. I put a lot of time into my library when I used XBMC to ensure they were in proper collections, proper sort titles, and that the genres were correct. Any ideas what I might be doing wrong? As a side note (excuse my ignorance), what am I supposed to do with a name.plexapp file? I know where the bundles go, but I see there are a few of these floating around in the thread and I don’t know what to do with them. I tried searching the forums and google, but turned up nothing useful.



Cheers

As I couldn’t get the NFO scanner to work (I’m trying FlexoFlexing’s one from post #354), I was looking into the log file.



Here are some errors which I couldn’t handle:




Here is the whole log-file
com.plexapp.agents.movienfo.log.zip (6.46 KB)

and here's the NFO file
10000 BC.zip (1.19 KB)

Could you help me with that error? Am I missing any Phyton Komponent? (I'm running Plex on WHS 2011)

Thanks a lot for your help

It sounds like we’re all in the same boat here. Are there are any specific settings we should put into Ember to make it save data better equipped for Plex? Most of the guides for Ember I have found out there are written with XBMC in mind, which is pretty close. I mainly just want it to pull metadata from the NFO files for my TV shows lol

Hi FlexoFlexing’s,



I’m coming closer and closer. I use your agent and most of my problems came from your enhancements regarding the Log-Entries.



My major issue now is the location of my poster. I use Extreme Media Manager to manage my whole archive and here, all posters are stored in a central folder. The reference to this folder is embedded into the nfo file as (/thumbs>.



Unfortunately I’m not a programmer and therefore couldn’t rewrite your statements for scanning the posterfile.



Here’s your part:


	def addPoster(self, metadata, media, lang):<br />
		filename = media.items[0].parts[0].file.decode('utf-8')<br />
		tbnFile = os.path.splitext(filename)[0] + ".tbn"<br />
		Log("Trying poster: " + tbnFile)<br />
		try:<br />
			data = Core.storage.load(tbnFile)<br />
			posterName = hashlib.md5(data).hexdigest()<br />
			if posterName not in metadata.posters:<br />
				metadata.posters[posterName] = Proxy.Media(data)<br />
				#valid_posters.append(posterName)<br />
				Log('Local poster image added: ' + tbnFile + ', for file: ' + filename)<br />
			else:<br />
				Log('skipping add for poster ' + tbnFile)<br />
		except:pass<br />
		return metadata



and here's the nfo-entry:


<thumb>F:\Videos\Extreme Movie Manager\WHS-Filme_cover\2-10-000-Bc.jpg</thumb>



Could you give me a favor and give me some hints, how your sequence to scan the posterfile look like?

I got your nfo reader to appear in the agents selection and whilst Plex did *try* to use it, it didn't seem actually take any information from the nfo with the exception perhaps of TV show name (though this could quite easily have been scraped from the folder name). Another unusual issue was that it only scraped 1 episode for each show I tested it on regardless of how many episodes were in the season folder, often assigning an episode number entirely different to that stored in the corresponding nfo file. Nevertheless, thanks for trying.

Hi Everyone,



I’d like to use Harley’s nfo importer to manage all my videos purely via the nfo describtions (XBMC style).



The reason I’d like to try Harley’s one over MTI’s one is, that he defined it as primary and that it includes the posters (). Both criteria are key for me.





Unfortunately, I’m not a coder and I couldn’t get it to work. I get an error message and it stops.



I tried to understand what happens, but I have no glue what happens.



here are the two relevant parts of the logfile:



<br />
2012-01-10 16:18:16,677 (1278) :  DEBUG (core:443) - Running pre-flight checks<br />
2012-01-10 16:18:16,677 (1278) :  CRITICAL (core:315) - Function named 'Start' couldn't be found in the current environment<br />
2012-01-10 16:18:16,677 (1278) :  INFO (core:450) - Started plug-in<br />
<br />
. . . . .<br />
<br />
1-10 16:18:16,834 (1e6c) :  DEBUG (core:315) - Requesting 'http://localhost:32400/library/metadata/2'<br />
2012-01-10 16:18:17,880 (1e6c) :  INFO (core:315) - 12<br />
2012-01-10 16:18:17,880 (1e6c) :  INFO (core:315) - test<br />
2012-01-10 16:18:17,880 (1e6c) :  INFO (core:315) - F:	est	est.avi<br />
2012-01-10 16:18:17,880 (1e6c) :  INFO (core:315) - ++++++++++++++++++++++++<br />
2012-01-10 16:18:17,880 (1e6c) :  INFO (core:315) - media<br />
2012-01-10 16:18:17,880 (1e6c) :  INFO (core:315) - <Framework.api.agentkit.Movie object at 0x03568ED0><br />
2012-01-10 16:18:17,880 (1e6c) :  INFO (core:315) - metadata<br />
2012-01-10 16:18:17,880 (1e6c) :  INFO (core:315) - 2<br />
2012-01-10 16:18:17,880 (1e6c) :  INFO (core:315) - [<Framework.api.agentkit.MediaItem object at 0x0359C750>]<br />
2012-01-10 16:18:17,894 (1e6c) :  INFO (core:315) - ++++++++++++++++++++++++<br />
2012-01-10 16:18:17,894 (1e6c) :  INFO (core:315) - scraped results: Test | year = None | id = 2| score = 100<br />
2012-01-10 16:18:17,894 (1e6c) :  DEBUG (core:315) - Response: 200<br />
2012-01-10 16:18:18,862 (1aac) :  DEBUG (core:315) - Handling request GET /:/plugins/com.plexapp.agents.xbmcnfo/messaging/function/X0FnZW50S2l0OlVwZGF0ZU1ldGFkYXRh/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKNwpzMgplbnM0CmxhbmdiMXM1CmZvcmNlbnMxMApwYXJlbnRHVUlEczUKTW92aWVzMTAKbWVkaWFfdHlwZXMxCjJzNApkYmlkczM4CmNvbS5wbGV4YXBwLmFnZW50cy54Ym1jbmZvOi8vMj9sYW5nPWVuczQKZ3VpZHMxCjJzMgppZHIwCg__<br />
2012-01-10 16:18:18,862 (1aac) :  DEBUG (model:32) - Loading model with GUID com.plexapp.agents.xbmcnfo://2?lang=en<br />
2012-01-10 16:18:18,862 (1aac) :  DEBUG (model:222) - Deserializing from C:\Users\Administrator\AppData\Local\Plex Media Server\Metadata\Movies\8\c7cb53c2e9cf3e65ae762da6f10c20809031439.bundle\Contents\com.plexapp.agents.xbmcnfo\Info.xml<br />
2012-01-10 16:18:18,862 (1aac) :  DEBUG (core:315) - Requesting 'http://127.0.0.1:32400/library/metadata/2/tree'<br />
2012-01-10 16:18:18,878 (1aac) :  INFO (core:315) - all your datas are belong to us<br />
2012-01-10 16:18:18,878 (1aac) :  INFO (core:315) - UPDATE: F:	est	est.avi<br />
2012-01-10 16:18:18,878 (1aac) :  INFO (core:315) - F:	est<br />
2012-01-10 16:18:18,878 (1aac) :  INFO (core:315) - 12<br />
2012-01-10 16:18:18,878 (1aac) :  INFO (core:315) - test<br />
2012-01-10 16:18:18,878 (1aac) :  CRITICAL (core:315) - Exception in the update function of agent named 'XBMC .nfo Importer', called with guid 'com.plexapp.agents.xbmcnfo://2?lang=en' (most recent call last):<br />
  File "C:\Users\Administrator\AppData\Local\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\agentkit.py", line 889, in _update<br />
    agent.update(obj, media, lang)<br />
  File "C:\Users\Administrator\AppData\Local\Plex Media Server\Plug-ins\XBMCnfo.bundle\Contents\Code\__init__.py", line 77, in update<br />
    (id, metadata)=self.scrapeNfo(metadata, media, lang)<br />
TypeError: 'NoneType' object is not iterable<br />
<br />
2012-01-10 16:18:18,878 (1aac) :  DEBUG (model:217) - Serializing to C:\Users\Administrator\AppData\Local\Plex Media Server\Metadata\Movies\8\c7cb53c2e9cf3e65ae762da6f10c20809031439.bundle\Contents\com.plexapp.agents.xbmcnfo\Info.xml<br />
2012-01-10 16:18:18,878 (1aac) :  DEBUG (core:315) - Response: 200



Attached, please also find the scanned nfo file , the used version of Harley's agent and the whole logfile.

Is there any chance, that anybody with python coding experience could help out here? That would be really, really great.

BTW, I use the Windows version of Plex 9.5.2 on my WHS-2011 machine. do all the metadata agents act identically on MAc OS and Windows? Do I need any hot fixes for the Plex version?

Thanks a lot in advance for your support

myhtpc

I have given up now trying to get this form of NFO agent to work (with usage of ).





I will stick on FlexoFlexing’s version with local movie files as I found a tool to export all posters and actors-pictures into the corresponding folder.



moviename.avi

moviename.nfo

moviename.tbn

fanart.jpg

/<.actors>actor1-name.tbn

/<.actors>actor2-name.tbn

/<.actors>acto3-name.tbn







Before I now scan all my 600 movies, here’s another question to the Plex Experts (MTI?):



What is required to make this agend primary?



Does this makes sense (having the agend as primary)?



An advantage would be, that less metadata files would be generated, any additional pros/cons?



Thanks in advance for your feedback





I am also using FlexoFlexing's modified Movie NFO.bundle from post #354. Did you figure out why the year wasn't scanning in? I am having the same problem.

Is there a working solution at this point? A lot of outdated information in this thread.

I didn’t take the time to read 19 pages worth of posts, but I tried the plugins linked to on the 2nd post, and they didn’t work for my nfo files generated by XBMC.

So I modified them until they worked.



I posted the result for both the TV Shows and Movies XBMC metadata agents on Github, and created plugins pages on the wiki:

http://wiki.plexapp.com/index.php/XBMC_Movies

http://wiki.plexapp.com/index.php/XBMC_TVShows



I created a new post here with more details.

Hey guys,



I just wanted to let you guys know TheVideosDB metadata agent is now available. The main difference between TheVideosDB and all of the other public agents is that we only serve your personal video descriptions to your Plex setup. The obvious benefit is that you can customize your metadata descriptions exactly how you want without worrying about messing anyone else up.



If you have used and customized the NFO agent in the past, you should find this to be a much easier solution for creating, managing, and backing up your metadata.



In the event you have to wipe your installation or change HTPC’s, all of your titles, descriptions, and posters would still be available for download as soon as you reinstall Plex.



Our service has been tested with the Plex Media Server v0.9.5.2 and up and it works perfectly. If you’re interested in trying it out, check out http://thevideosdb.com and sign up for the Preview Pass.



Thanks!

Hey myhtpc,

Sorry for the lack of responses. I haven’t been around here lately. I can look into better handling of the posters. I wrote mine to work with the output I had setup for Ember Media Manager, where my movies are stored as single files, with the meta-data stored alongside as like named files.

Anyway, I wanted to get my script modified over to work with TV shows too. I’ll post something when I’m done.

Hey,



is there a way to get the NFO Agent working for TV Series on Windows? I got it already working for movies.



edit: my structure looks like this:

(have not added all metadata with ember yet here)


I doubt any plugin would be able to understand localized-seasons folders.
After renaming those folders, you can try the plugins I posted in #376, they should work with your directory structure.