Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Metadata agents for exported XBMC library

145791074

Comments

  • pierrejean75pierrejean75 Posts: 53 ✭✭

    Indeed, it's not in the NFO, but this URL that fails to load:
    http://localhost:32400/library/metadata/5822

    This URL should return the metadata that Plex has for the 10 minutes à vivre movie. And it doesn't load.
    I just tried on my install, and have the same problem.
    That URL is also used by the new web UI; trying to click on that movie in the web UI, you'll probably receive an error, after waiting a while for that URL to load.
    Not sure if this has been reported already, but it should be, if not.

    *edit: Going back to PMS 0.9.6 should fix this: http://wiki.plexapp.com/index.php/Downloads


    Hello Guillaume,
    Thank's (another time) for your time and help, I have yesterday change all the titles names of my movies collection to take out any characters like "é,è,à,ô,î,ï" from the titles, I have more thumbnails but not all even each of my movie have separate folder with one .nfo one .tbn files)
    But always not any information in the metada ....
    Do you have an idea ? I use a Synology with last firmware updated and PLEX vers 0.9.6

    Here an example and my log file ( I will delete it after you have read it to not ake too much place here on the forum)

    Here the nfo file of the same movie of the hard screen copy attached (this nfo file is issued from Filmotech softwre but I have also test with XMBC export and having same problem)

    Thank's for your help....so precious....

    <?xml version="1.0" encoding="UTF-8"?>
    <movie>
    <title>10 jours en or</title>
    <originaltitle></originaltitle>
    <director>Nicolas Brossette</director>
    <year>2011</year>
    <runtime>96 mn</runtime>
    <country></country>
    <rating>2</rating>
    <genre>Comédie dramatique</genre>
    <actor><name>Franck Dubosc (Marc Bajau)</name></actor>
    <actor><name>Claude Rich (Pierre)</name></actor>
    <actor><name>Marie Kremer (Julie)</name></actor>
    <actor><name>Rufus (Clément Rozière)</name>
    </actor><actor><name>Eric Godon (Le marchand de sommeil)</name></actor>
    <actor><name>Marie-Julie Baup (le vendeuse de la boutique)</name></actor>
    <thumb>10 jours en or.tbn</thumb>
    <thumb>10 jours en or.tbn</thumb>
    <outline>Marc Bajau sillonne le pays pour le compte d'une marque de vêtements. Il aime cette vie sur la route, libérée de toute contrainte et faite de rencontres d'un soir. Mais alors qu'il démarre une nouvelle tournée de promotion, sa dernière conquête s'en va en lui laissant son fils, Lucas, un petit métis de six ans...

    Commence alors une traversée de la France pas comme les autres, où Marc et Lucas vont croiser la route de Pierre, un retraité fantasque et envahissant, et celle de Julie, une jeune femme en errance.

    Au cours de cette odyssée, flanqué de son trio improbable, Marc Bajau va connaître « 10 jours en or » qui vont changer sa vie.</outline>
    <plot>Marc Bajau sillonne le pays pour le compte d'une marque de vêtements. Il aime cette vie sur la route, libérée de toute contrainte et faite de rencontres d'un soir. Mais alors qu'il démarre une nouvelle tournée de promotion, sa dernière conquête s'en va en lui laissant son fils, Lucas, un petit métis de six ans...

    Commence alors une traversée de la France pas comme les autres, où Marc et Lucas vont croiser la route de Pierre, un retraité fantasque et envahissant, et celle de Julie, une jeune femme en errance.

    Au cours de cette odyssée, flanqué de son trio improbable, Marc Bajau va connaître « 10 jours en or » qui vont changer sa vie.</plot></movie>
  • gboudreaugboudreau Posts: 73 Plex Pass
    You still have a problem that isn't with this agent, but with your Plex core.

    Here's the part of your log that is relevant:
    http://pastie.org/pastes/5488326/text

    You should create a new post in the appropriate forum (for Synology?), and try to fix that problem, where your Plex core doesn't return a response when anything tries to load a metadata URL.


    Hello Guillaume,
    Thank's (another time) for your time and help, I have yesterday change all the titles names of my movies collection to take out any characters like "é,è,à,ô,î,ï" from the titles, I have more thumbnails but not all even each of my movie have separate folder with one .nfo one .tbn files)
    But always not any information in the metada ....
    Do you have an idea ? I use a Synology with last firmware updated and PLEX vers 0.9.6
  • pierrejean75pierrejean75 Posts: 53 ✭✭

    You still have a problem that isn't with this agent, but with your Plex core.

    Here's the part of your log that is relevant:
    http://pastie.org/pastes/5488326/text

    You should create a new post in the appropriate forum (for Synology?), and try to fix that problem, where your Plex core doesn't return a response when anything tries to load a metadata URL.


    Ok thank's a lot. I have post a new Topic on the forum and I have send an email to Synogoly
  • worthington_jworthington_j Posts: 1 Plex Pass
    edited December 2012
    This agent worked great for me. It imported the information from my .nfo files and put them into plex. The one one thing it didn't do was import the <playcount> tag. It would be a nice to have all your watched movies from xbmc be imported as watched into plex. Please let me know if this is an option to get added.
  • gboudreaugboudreau Posts: 73 Plex Pass
    I don't think metadata agents can change the play count in Plex's database.
    Those are the objects we work with: http://dev.plexapp.com/docs/agents/models.html

    This agent worked great for me. It imported the information from my .nfo files and put them into plex. The one one thing it didn't do was import the <playcount> tag. It would be a nice to have all your watched movies from xbmc be imported as watched into plex. Please let me know if this is an option to get added.
  • hoopstanuhoopstanu Posts: 1 Plex Pass

    If you already have metadata in XBMC, and would like to use that in Plex.

    I took the code posted by Harley Hooligan, and changed it to work with my files.

    In XBMC, go in Settings > Videos > Library > Export Video Library. Choose Separate files & Export Thumbnails and fanart, and optionally overwrite existing files.
    This will create .nfo & .jpg files for your TV Shows and Movies, in the appropriate directories.




    I had been having issues with XBMC's exported posters being imported into Plex. I previously had duplicate .tbn files from another media scraper source in the same movie folders, and had no problems. After cleaning up the NAS earlier this month, I lost all posters...yes, I deleted the .tbn files from the "other" media scraper. After reviewing the OP, I noticed that XBMC, correctly, exports .jpg posters. However, the latest code provided for the XBMC Movies Metadata Agent utilizes '.tbn' searching for *poster*.jpg provided by XBMC. Editing the __init__.py to search for '-poster.jpg' will allow Plex to utilize the exported poster files. Can't believe I didn't see this earlier, many hours wasted deleting/refreshing. Didn't see this solution posted anywhere else. Hope it works for others.
  • gidevagideva Posts: 25 ✭✭
    Hi there,

    moving now to Windows Plex Media Server on FlexiRaid machine and I was trying to use the agent with it but with no success (I copied the two files in Program Files/Plex/Plex Media Server/Resources/ Plug-Ins). What am I making wrong???
  • matfmatf Posts: 21 ✭✭
    edited December 2012
    Salut!

    I've just been trying to test this on my Ubuntu 12.04 box. I set up Plex, installed your plugin - but I can't get it to appear in any of the agents lists. I can see from the log that it's trying to load it - but it says a file is missing:

    >>
    Dec 17, 2012 17:28:39 [0xac5f5b40] DEBUG - Starting plug-in /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/XBMC .nfo Importer.bundle.
    Dec 17, 2012 17:28:39 [0xac5f5b40] ERROR - Caught exception starting plugin /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/XBMC .nfo Importer.bundle (Empty or non-existant file.)
    <<

    Now I know the contents are all there - I just extracted the files into the Plugins folder. Contents are:
    /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/XBMC .nfo Importer.bundle/Contents/
    /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/XBMC .nfo Importer.bundle/Contents/Info.plist
    /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/XBMC .nfo Importer.bundle/Contents/Code/
    /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/XBMC .nfo Importer.bundle/Contents/Code/__init__.py


    [EDIT]
    Worked this out - basically a permissions thing - some of the files in the folders weren't assigned to plex as a user. Now done and the .nfo importer appears as an agent and inports the .nfo. Doesn't import the folder.jpg though...
    [/EDIT]
  • mitch969mitch969 Posts: 319 Plex Ninja
    hoopstanu wrote:

    I had been having issues with XBMC's exported posters being imported into Plex. I previously had duplicate .tbn files from another media scraper source in the same movie folders, and had no problems. After cleaning up the NAS earlier this month, I lost all posters...yes, I deleted the .tbn files from the "other" media scraper. After reviewing the OP, I noticed that XBMC, correctly, exports .jpg posters. However, the latest code provided for the XBMC Movies Metadata Agent utilizes '.tbn' searching for *poster*.jpg provided by XBMC. Editing the __init__.py to search for '-poster.jpg' will allow Plex to utilize the exported poster files. Can't believe I didn't see this earlier, many hours wasted deleting/refreshing. Didn't see this solution posted anywhere else. Hope it works for others.


    You are right, XBMC Eden was using posters with name "MovieTitle.tbn" but XBMC Frodo use "MovieTitle-poster.jpg".

    @Guillaume, could you please edit the code to support posters of XBMC Eden and XBMC Frodo at the same time ? The idea is to ask PMS to import the poster in ".tbn" format but if there is none, PMS could try to import the poster using "-poster.jpg". If it is possible, XBMC .nfo importer will be compatible with both versions of XBMC.
  • Salut Guillaume,

    The agent works well,I use Xbne to make nfo, fanart and rename files. But for some movies the agent fail to get information. The result in plex is the name, the running time and the audio format.I have found what to do to make it works : Remove the ID value in the nfo file.

    For example with "Brèche (2007)" if I leave "<id>tt0401997</id>" it won't works
    <id>tt0401997</id>
    <imdb>tt0401997</imdb>

    It's the same for "Admam (2004)" and many others
    <id>tt0335121</id>
    <imdb>tt0335121</imdb>

    But for a nother movie like "99 francs (2007)" I can leave it want it will works
    <id>tt0875113</id>
    <imdb>tt0875113</imdb>

    Do you have a idea what's going wrong ???

    I use Win 7 64 fr with plex 0.9.7.7-5ec3b53
  • edited December 2012

    Salut Guillaume,

    The agent works well,I use Xbne to make nfo, fanart and rename files. But for some movies the agent fail to get information. The result in plex is the name, the running time and the audio format.I have found what to do to make it works : Remove the ID value in the nfo file.

    For example with "Brèche (2007)" if I leave "<id>tt0401997</id>" it won't works
    <id>tt0401997</id>
    <imdb>tt0401997</imdb>

    It's the same for "Admam (2004)" and many others
    <id>tt0335121</id>
    <imdb>tt0335121</imdb>

    But for a nother movie like "99 francs (2007)" I can leave it want it will works
    <id>tt0875113</id>
    <imdb>tt0875113</imdb>

    Do you have a idea what's going wrong ???

    I use Win 7 64 fr with plex 0.9.7.7-5ec3b53


    I have commented lines (45-46) and I skip the bug:)

    def search(self, results, media, lang):
    ...
    #if len(imdb_id) > 2:
    # media.id = imdb_id
    ...
  • pierrejean75pierrejean75 Posts: 53 ✭✭
    edited December 2012
    XBMC nfo Importer work now on my Synology !!!!!!!!!!!

    The solution is : rename XBMC .nfo Importer.bundle to XBMCnfoImporter.bundle (no space and no dot in the name)

    and modi fy the file __init__.py as follow

    Original :

    class xbmcnfo(Agent.Movies):
    name = 'XBMC .nfo Importer'
    primary_provider = True
    languages = [Locale.Language.NoLanguage]

    Modified :


    class xbmcnfo(Agent.Movies):
    name = 'XBMCnfoImporter'
    primary_provider = True
    languages = [Locale.Language.NoLanguage]
  • pierrejean75pierrejean75 Posts: 53 ✭✭
    edited January 2013
    .........
  • pierrejean75pierrejean75 Posts: 53 ✭✭
    First at all I wish you an happy New year

    I have resolve part of my trouble with your XBMC nfo Importer Agent on my SYNOLOGY with ARM processor

    The solution was that the name of the agent must be only "one word", no space not dot = "XMBCnfoImporter" and not "XMBC .nfo Importer"

    But I still have a problem : as soon as the agent do not find a movie instead of leave it and continue it STOP

    Could you please try to make something ?

    And a second request .... if you can ... could you add something to accept the title with UpperCase and LowerCase as the same file ...?

    Thanks for all

    Here attached my last LOG file

    Pierre Jean
  • pierrejean75pierrejean75 Posts: 53 ✭✭
    edited January 2013
    Is there anybody who could help me to use the XBMC nfo Importer with a Synology on ARM processor ?

    The Agent work now that I have modify the name ( XBMCnfoImporter ) instead of (XBMC .nfo Importer)

    But he does not have scann all my libraries and now the first scan work fine PLEX find all my movies but as soon as the Agent XBMC nfo Importer begin it stop after one or 2 movies...

    See attached some log files

    Thank's for your precious help

    Pierre Jean
  • fonzie01fonzie01 Posts: 5
    edited January 2013
    I'm coming from XBMC and having difficulty importing my library correctly.

    I'm using the XBMC importer agent provided in this thread. I have all of my movies in separate folders with the movie title and release year in parenthesis. This is an example of my folder structure:

    Movies/
          /Dances With Wolves (1990)
                     /Dances.With.Wolves.1990.1080p.Bluray.mkv
                      Dances.With.Wolves.1990.1080p.Bluray.tbn
                      fanart.jpg
                      logo.png
                      movie.nfo
    
    Shows/
         /Band of Brothers
             /Season 1
               s01e01.mkv
               s01e01.tbn
               s01e02.mkv
               s01e02.tbn
            banner.jpg
            clearart.png
            fanart.jpg
            landscape.jpg
            logo.png
            poster.jpg
            season01.tbn
            season-all.tbn
            tvshow.nfo          
    

    What it does import correctly:
    -Movie and TV Posters
    -Movie and TV Fanart


    What it does NOT import:
    -Movie synopsis
    -Movie Genre
    -Movie Rating
    -Movie Director
    -Movie Studio
    -TV Show Genre
    -TV Show Banner
    -TV Show Logo


    Basically, the only thing the agent imports is the artwork for Movies and TV shows. How would I go about getting it to import all the other data (genre, synopsis,director) as well?

    I'm willing to settle for it even rescraping all the new information as long as I can retain all of my stored artwork (posters,fanart,logos,banners) for my movies and shows

    *I'm Using Windows 7
  • luthienluthien Posts: 147
    edited February 2013
    Hey,
    i am using a windows Server.
    i tried the Movie scanner and it works perfectly.
    But the TV-Shows do not get scrapped. How are the files supposed to be named?

    edit: almost working now thx to post #77

    But i am missing genre and episode duration for the complete show view and release date for the episodes now.
    Oh and the theme is missing also.

    EDIT: It is not working anymore. Somehow the localmedia.bundle resets itself after a while. Thus the scraper does not work anymore. Any suggestions?
  • panchetopancheto Posts: 2
    hi Guillaume. I just submitted a pull-request on GitHub in order to update both movies and tvshows agents for Frodo compatibility without loosing previous compatibility (Eden and maybe older versions). let me know if you are ok with the changes.
  • gboudreaugboudreau Posts: 73 Plex Pass
    pancheto wrote:

    hi Guillaume. I just submitted a pull-request on GitHub in order to update both movies and tvshows agents for Frodo compatibility without loosing previous compatibility (Eden and maybe older versions). let me know if you are ok with the changes.

    Thanks. Merged both.
  • pierrejean75pierrejean75 Posts: 53 ✭✭
    edited February 2013

    on SYNOLOGY with ARM, XBMC .nfo still not work even with the last version of Plex ( 9.7.12 )

    Here part of my LOG
     

    2013-02-12 20:31:40,400 (43545490) : INFO (__init__:15) - Searching
    2013-02-12 20:31:40,437 (43545490) : DEBUG (networking:172) - Requesting 'http://localhost:32400/library/metadata/6398'
    2013-02-12 20:32:00,469 (43545490) : CRITICAL (agentkit:931) - Exception in the search function of agent named 'XBMCnfoImporter', called with keyword arguments {'openSubtitlesHash': '84bd66f9bda7d756', 'name': '10 Jours en Or', 'filename': '%2Fvolume1%2Fvideo%2FFilmsTest%2F10%20Jours%20en%20Or%2F10%20Jours%20en%20Or%2Eavi', 'plexHash': 'f1b29f4354cf7649bc53f4ec8e4ac88c8bfd1763', 'duration': '5785920', 'id': '6398'} (most recent call last):
    File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 923, in _search
    agent.search(results, media, lang)
    File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/XBMCnfoImporter.bundle/Contents/Code/__init__.py", line 19, in search
    xml = XML.ElementFromURL(pageUrl)
    File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/parsekit.py", line 344, in ElementFromURL
    method=method,
    File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/networkkit.py", line 67, in _http_request
    req = self._core.networking.http_request(url, *args, **kwargs)
    File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/networking.py", line 422, in http_request
    return HTTPRequest(self._core, url, data, h, url_cache, encoding, errors, timeout, immediate, sleep, opener, follow_redirects, method)
    File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/networking.py", line 147, in __init__
    self.load()
    File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/networking.py", line 183, in load
    f = self._opener.open(req, timeout=self._timeout)
    File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Platforms/Shared/Libraries/urllib2_new.py", line 438, in open
    response = self._open(req, data)
    File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Platforms/Shared/Libraries/urllib2_new.py", line 456, in _open
    '_open', req)
    File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Platforms/Shared/Libraries/urllib2_new.py", line 416, in _call_chain
    result = func(*args)
    File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Platforms/Shared/Libraries/urllib2_new.py", line 1217, in http_open
    return self.do_open(httplib.HTTPConnection, req)
    File "/volume1/Plex/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Platforms/Shared/Libraries/urllib2_new.py", line 1192, in do_open
    raise URLError(err)
    URLError: <urlopen error timed out>
     



    Do you have one idea why I have this critical error and how I can resolve it ?


    Here what I have when I put in my browser : http://localhost:32400/library/metadata/6398
     

    <MediaContainer size="1" allowSync="1" identifier="com.plexapp.plugins.library" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1360228706"><Video ratingKey="6398" key="/library/metadata/6398" guid="local://6398" type="movie" title="10 Jours en Or" summary="" thumb="/library/metadata/6398/thumb/1360696731" duration="5785920" addedAt="1360696731"><Media id="6252" duration="5785920" bitrate="1020" width="720" height="304" aspectRatio="2.35" audioChannels="2" audioCodec="mp3" videoCodec="mpeg4" videoResolution="480" container="avi" videoFrameRate="24p"><Part id="6258" key="/library/parts/6258/file.avi" duration="5785920" file="/volume1/video/FilmsTest/10 Jours en Or/10 Jours en Or.avi" size="738043904" container="avi"><Stream id="10445" streamType="1" codec="mpeg4" index="0" bitrate="883" bvop="1" duration="5785920" frameRate="23.976" gmc="0" height="304" level="5" profile="asp" qpel="0" width="720"/><Stream id="10446" streamType="2" selected="1" codec="mp3" index="1" channels="2" bitrate="128" bitrateMode="cbr" duration="5785920" samplingRate="48000"/></Part></Media></Video></MediaContainer>
     



    Thank's a lot for your help

145791074
Sign In or Register to comment.