NFO agent

Bump - anyone get this working with Windows? :slight_smile:

Hi - this is my very first post here on the Plex forum.



I have been playing around with the NFO (Movies).bundle

and came across some inconsistent and annoying behaviour.



When I don’t give any plot in my .nfo-file,

the corresponding xml file produced by the agent and stored in the Metadata folder just contains an immaculate

.

When I do give a plot, say Howdy, then, of course, that xml file contains Howdy.

When I change my mind and just enter , the xml file contains None ,

which in a certain sense is correct.

But when I remove the -entry completely, the xml file still contains None,

whereas, I would think, it should return to .



This has some unpleasant side effects. Any agent of lower priority which does provide a summary,

is superseded by this entry None . So the result is “None”,

whereas a summary indeed exists.



By the way, this also seems to happen with standard agents. Sometimes the TMDB agent also

produces None, when tmdb has no summary.

This prevents subsequents agents to deliver their summary entries.

This is certainly not the desired behaviour.



Btw, I never did any coding. I only did some educated guesses in adjusting my NFO agent.

So for instance, I do not know what the call nfoXML.xpath(’./plot’)[0].text really produces.



Any hints?

I too am looking to move from a Windows based XBMC installation with NFO files for every movie & tv show, to Plex.



I can’t seem to get MTI’s NFO agent to work either, but I think that it’s just a current limitation of PMS for Windows - see this thread for others talking about not being able to specify metadata agents. I think we just have to wait for it to be included in a coming release. Happy to be wrong though.



That's what I think as well...

Pity, 'cause the whole point of using PMS on Windows was to test this NFO agent before I upgrade my official (it means living room) Mac Plex setup.

For those that care, this plug-in seems to work for me with a Windows based server.



The following are the steps I followed




Download “Movie NFO.bundle.zip” from post #268



Open zip file, you should see two folders:

_MACOSX

NFO (Movie).bundle



Extract the “NFO (Movie).bundle” directory to the “
\Plex Media Server\Plug-ins” directory.



On my XP box it is the following:

C:\Documents and Settings\MYNAME\Local Settings\Application Data\Plex Media Server\Plug-ins\NFO (Movie).bundle



I then modified “
\Plex Media Server\Plug-in Support\Metadata Combination\com.plexapp.agents.imdb\Movies.xml”. Adding a line for the “nfo plugin” between “localmedia” and “imdb” lines:





<combine class="Movie"><br />
    <sources><br />
        <agent>com.plexapp.agents.localmedia</agent><br />
        <agent>com.plexapp.agents.nfomovie</agent><br />
        <agent>com.plexapp.agents.imdb</agent><br />
        <agent>com.plexapp.agents.wikipedia</agent><br />
        <agent>com.plexapp.agents.themoviedb</agent><br />
        <agent>com.plexapp.agents.movieposterdb</agent><br />
    </sources><br />
</combine>




Restarted plex.


Created the following basic nfo file named "The Graduate (1967).nfo":



<?xml version="1.0" encoding="UTF-8"?><br />
<movie><br />
<title>The Graduate</title><br />
<sorttitle>Test</sorttitle><br />
<year>1967</year><br />
<runtime>100 minutes</runtime><br />
<credits></credits><br />
<director>Plex Test</director><br />
<tagline>Plex Tag Line</tagline><br />
<mpaa>G</mpaa><br />
<plot>Plex Was Here, Robert DeNiro, Al Pacino, and Val Kilmer star in one of the great cop thrillers of the '90s. Neil McCauley (DeNiro) is a veteran thief operating with crew members Chris Shiherlis (Kilmer) and ex-convict Michael Cheritto (Tom Sizemore). When his group botches the robbery of an armored car -- resulting in the death of three police officers -- Detective Vincent Hanna (Pacino) is assigned to investigate. Each of the main characters struggles to balance the demands of their profession with their personal lives, providing non-stop suspense and a memorable ending. Also appearing in the picture are Jon Voight, Diane Venora, and Natalie Portman.</plot><br />
<genre>Action / Crime / Comedy</genre><br />
</movie><br />




Created a movie file named "The Graduate (1967).mp4".

Created a new folder on the Plex server, copied both files in

From the Plex web GUI, added a new "Movies" section, left all defaults ("Plex Movie Scanner" and "Freebase"), added my new folder.

The movie was added.

All of my metadata was used except for , which I believe is expected at this point. The information I did not include such as "Studio", "Originally Available" and the Poster art were downloaded from the internet. The background art was created from my video file, though I think this is just because there was no artfound on the web.

I hope this helps other get this working on Windows.


Thanks for posting. I have it working following your steps.

For those using Windows and want to change the order of the scanners, you just change the order in the Movies.xml file. I just moved the line com.plexapp.agents.themoviedb in front of the line agent>com.plexapp.agents.wikipedia and my summary info changed to what’s on TMDB.

I think I followed all the steps but I couldn’t get Plex to use my .NFO files. :frowning:



I’m using the latest version 0.9.3.4 on Windows XP. My files are all tagged with Ember Media Manager. Plex 8 never had a problem with them
 Gee, I am on the verge of upgrading my Mac Mini but I don’t want to re-tag everything




Another thing, is there any way to keep the “Watched/Unwatched” tag when upgrading from .8 (ooops, off-topic, I know, I know
)

I was just curious if any developers have looked into allowing us to set the sort title with this agent. I know in the past it was not possible, and currently is not possible. That is the only thing this agent is missing. And would be a great add on.



Chris



Seems like sort title isn't listed as available values here, so doubtfully it will work any time soon: http://dev.plexapp.com/docs/offline/PlexPlug-inFramework.pdf (page 40-41).

Hey,



i’m trying to get this working. I am using Ember Media Manager to create the NFO Files etc.



But Plex gets only the title, cover and fanart.



No plot or anything else.



edit: I solved my problem by using the NFO Agent of MTI in post #286

Now i got another Problem. How does the nfo look like for tv shows?



I attached a screenshot of the data structure





This worked great! Is there any chance of getting tv shows working on windows too?

Hey All, just started using plex primarily to stream the movies I already had setup for my xbmc systems. This plugin has been awesome for that! However, since I already have all my data pulled I wanted to totally bypass imdb. So I modified the movienfo agent from post #286.



So I added a few things

-It now does writers, genres, certifications, etc. and it’s very forgiving, if the data is not there it’s blank, the scanner doesn’t crash.

-It pulls the fanart & poster provided, but it’s pretty basic, since my setup is entirely single files it expects .tbn (poster) and -fanart.jpg. Since for some reason the localmedia one was not pulling everything.

-Since I didn’t want it to work with imdb I associated it with Personal Media (agent.none).



SO c:\Users<Username>\AppData\Local\Plex Media Server\Plug-in Support\Metadata Combination\com.plexapp.agents.none\Movies.xml is





com.plexapp.agents.movienfo







Anyway, hope this helps someone. I have zero experience with python, mostly java, but it seems to all be working. If you want to give it a try let me know if you have any problems.

Hey, somehow i don’t get the year from my NFO file tagged.



Do you got any idea why?



Thats how my files look like. The only year i get it the year i added the movie in my library.


Hmm i got it now. Is there a way to skip the “Media Analysis” and use the data from my NFO-Files? I got everything in there.



A total file looks like this:



<?xml version="1.0" encoding="utf-8"?><br />
<movie xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><br />
  <id>tt0372784</id><br />
  <title>Batman Begins</title><br />
  <originaltitle>Batman Begins</originaltitle><br />
  <year>2005</year><br />
  <releasedate>16.06.2005</releasedate><br />
  <top250>113</top250><br />
  <rating>8.3</rating><br />
  <votes>329,568</votes><br />
  <mpaa>Germany:12</mpaa><br />
  <certification>Germany:12</certification><br />
  <genre>Action / Thriller</genre><br />
  <studio>Warner Bros. Pictures</studio><br />
  <director>Christopher Nolan</director><br />
  <credits>Bob Kane / David S. Goyer</credits><br />
  <outline>Wie wurde Bruce Wayne zu Batman? Als kleiner Junge musste Bruce Wayne (Christian Bale) mit ansehen, wie seine Eltern auf grauenhafte Weise umgebracht wurden....</outline><br />
  <plot>Wie wurde Bruce Wayne zu Batman? Als kleiner Junge musste Bruce Wayne (Christian Bale) mit ansehen, wie seine Eltern auf grauenhafte Weise umgebracht wurden. Deshalb kĂŒmmert sich der Butler Alfred Pennyworth (Michael Caine) um ihn und zieht ihn groß. Eines Tages macht er sich in aller Welt auf die Suche nach einem Weg, die Ungerechtigkeit zu bekĂ€mpfen. Als er nach seiner Reise wieder in seine Heimatstadt Gotham City zurĂŒckkehrt, muss er feststellen, dass die Verbrechensrate deutlich angestiegen ist. Dieser Umstand und der Drang nach Rache am Mord seiner Eltern treiben ihn langsam aber sicher dazu, sich Kampftechniken beizubringen und ein FledermauskostĂŒm zu entwerfen, mit deren Hilfe er Nacht fĂŒr Nacht die Kriminellen der Stadt zur Strecke bringt - als Batman...</plot><br />
  <runtime>140 min</runtime><br />
  <actor><br />
    <name>Christian Bale</name><br />
    <role>Bruce Wayne / Batman</role><br />
    <thumb>http://ia.media-imdb.com/images/M/MV5BMTQ4OTI4MTQ5MV5BMl5BanBnXkFtZTcwOTY5NzY2Mg@@._V1._SY275_SX400_.jpg</thumb><br />
  </actor><br />
  <actor><br />
    <name>Michael Caine</name><br />
    <role>Alfred</role><br />
    <thumb>http://ia.media-imdb.com/images/M/MV5BMjAwNzIwNTQ4Ml5BMl5BanBnXkFtZTYwMzE1MTUz._V1._SY275_SX400_.jpg</thumb><br />
  </actor><br />
  <actor><br />
    <name>Liam Neeson</name><br />
    <role>Henri Ducard</role><br />
    <thumb>http://ia.media-imdb.com/images/M/MV5BNjUzOTY2NDA3OV5BMl5BanBnXkFtZTYwODY2ODI4._V1._SY275_SX400_.jpg</thumb><br />
  </actor><br />
  <actor><br />
    <name>Katie Holmes</name><br />
    <role>Rachel Dawes</role><br />
    <thumb>http://ia.media-imdb.com/images/M/MV5BNTA2NjY5OTkzNl5BMl5BanBnXkFtZTcwMDE2NTkxNA@@._V1._SY275_SX400_.jpg</thumb><br />
  </actor><br />
  <actor><br />
    <name>Morgan Freeman</name><br />
    <role>Lucius Fox</role><br />
    <thumb>http://ia.media-imdb.com/images/M/MV5BMTc0MDMyMzI2OF5BMl5BanBnXkFtZTcwMzM2OTk1MQ@@._V1._SY275_SX400_.jpg</thumb><br />
  </actor><br />
  <fanart url="http://images.themoviedb.org"><br />
  </fanart><br />
  <fileinfo><br />
    <streamdetails><br />
      <audio><br />
        <channels>6</channels><br />
        <codec>ac3</codec><br />
        <language>eng</language><br />
        <longlanguage>English</longlanguage><br />
      </audio><br />
      <audio><br />
        <channels>6</channels><br />
        <codec>ac3</codec><br />
        <language>deu</language><br />
        <longlanguage>German</longlanguage><br />
      </audio><br />
      <subtitle><br />
        <language>eng</language><br />
        <longlanguage>English</longlanguage><br />
      </subtitle><br />
      <subtitle><br />
        <language>deu</language><br />
        <longlanguage>German</longlanguage><br />
      </subtitle><br />
      <subtitle><br />
        <language>deu</language><br />
        <longlanguage>German</longlanguage><br />
      </subtitle><br />
      <video><br />
        <aspect>1.25</aspect><br />
        <codec>mpeg2</codec><br />
        <duration>134 mins</duration><br />
        <height>576</height><br />
        <width>720</width><br />
      </video><br />
    </streamdetails><br />
  </fileinfo><br />
</movie>



Since i got everything already scanned with my NFO tool there is no need to rescan it with Plex.

Gents,



I’ve used the NFO bundle for movies and it works fine on my windows machine–thanks for this. I have a couple of other questions:


  1. Is there a Local NFO Agent for TV shows that works in Windows (XBMC file structure)?


  2. Is there a way to edit movies/TV shows’ watched vs. unwatched tags?



    Cheers.

Has anyone had any luck getting this to work with date-based TV shows? I’m getting a few exceptions, and have worked through a few but got stuck on:


<br />
2011-11-22 16:16:49,384 (-4f3d1000) :  CRITICAL (runtime:247) - Exception in task thread (most recent call last):<br />
  File "/Users/username/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 245, in _start<br />
    obj._exec()<br />
  File "/Users/username/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 196, in _exec<br />
    self._result = self._f(*self._args, **self._kwargs)<br />
  File "/Users/username/Library/Application Support/Plex Media Server/Plug-ins/XBMCnfoTV.bundle/Contents/Code/__init__.py", line 152, in UpdateEpisode<br />
    if(epID.count('allLeaves') == 0):<br />
AttributeError: 'NoneType' object has no attribute 'count'<br />




i.e. the epID isn't getting filled, for some reason.

I investigate this a couple of weeks ago. The episode is null for date based shows, that’s while this part of the agent traps. However, there’s a way to get to the metadata model for those episodes, but I found that even after successfully adding the metadata, Plex still didn’t display it. I think it has something to do with the episode number (which shows up as -1 in media manager). I didn’t investigate further, I just renamed those episodes to S = year, E = monthDay.




Ah, thanks. I spent a good chunk of time trying to fix this, even going so far as to rewrite an agent to do it; but the data was never showing up. Switching the file naming to sYEAReMONTHDAY isn't ideal, but works, even with my new agent; so it must be some weird bug to do with date-based shows/episodes.

Ah well, I can get the metadata in, that's what is important, thanks!