XMBC Scraper - Does it work? (1 Viewer)

clahti

Portal Member
November 19, 2008
27
2
Hello all:

I am trying to get the XMBC scraper to work and cannot seem to get this going. In the configuration I have disabled all scraper scripts but XMBC for movie info, cover, and backdrop. I have the following test movie:

\\server\video\Box, The
Box, The.mkv
backdrop.jpg
folder.jpg
movie.nfo

movie.nfo contains the following:

<movie>
<title>The Box</title>
<sorttitle>box the</sorttitle>
<rating>1.0</rating>
<year>2009</year>
<plot>Norma and Arthur Lewis, a suburban couple with a young child, receive a simple wooden box as a gift, which bears fatal and irrevocable consequences. A mysterious stranger, delivers the message that the box promises to bestow upon its owner $1 million with the press of a button. But, pressing this button will simultaneously cause the death of another human being somewhere in the world; someone they don't know. With just 24 hours to have the box in their possession, Norma and Arthur find themselves in the cross-hairs of a startling moral dilemma and must face the true nature of their humanity.</plot>
<tagline>You Are The Experiment</tagline>
<runtime>115</runtime>
<mpaa>PG-13</mpaa>
<id>tt0362478</id>
<genre>|Drama|Horror|Mystery|Sci-Fi|Thriller|</genre>
<director>|Richard Kelly|</director>
<actor>
<name>Cameron Diaz</name>
</actor>
<actor>
<name>James Marsden</name>
</actor>
<actor>
<name>Frank Langella</name>
</actor>
<actor>
<name>James Rebhorn</name>
</actor>
<actor>
<name>Holmes Osborne</name>
</actor>
<actor>
<name>Sam Oz Stone</name>
</actor>
<actor>
<name>Gillian Jacobs</name>
</actor>
<actor>
<name>Celia Weston</name>
</actor>
<actor>
<name>Deborah Rush</name>
</actor>
<actor>
<name>Lisa K. Wyatt</name>
</actor>
</movie>
The Box (2009/I)


I would expect that the importer would add this to the database using the xml data in the nfo file and grab the cover art and fanart from the movie folder, this avoiding going to the internet completely because all required information and artwork is available locally. When I attempt to import this however, nothing is found. Am I missing something?

Thanks!
 

RoChess
Country flag

Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,260
    1,758
    Switch MediaPortal into debug mode, and then enable the Scraper debug mode as well (go into manual scraper configuration and then use the tools icon to enable scraper debug mode, which you can verify via green little icon).

    Then either find out why it is not working by examining the movingpictures.log file yourself, or attach it on here so that others can help you.

    Edit: rereading your post, I notice something obvious. As per the XBMC NFO format, which you can read in full at:

    http://xbmc.org/wiki/?title=Import_-_Export_Library#Video_nfo_Files

    You need to use:

    If there are multiple media files in a folder, the *.nfo must be named exactly the same as the video file it is representing (ie. moviename.avi and moviename.nfo). In the case of multi-part (stacked) video stacking, name the file either moviename.nfo or moviename-CD1.nfo where the first filename is moviename-CD1.avi.
    Your 'movie.nfo' fails for that reason and needs to be renamed into 'Box, The.nfo'

    Edit #2: Nevermind, it should work, since the images aren't media files. So you are back to the scraper debugging then.
     

    clahti

    Portal Member
    November 19, 2008
    27
    2
    Ok, thanks for your help I was able to narrow down the problems, I have only two remaining now. The writers and language fields are not recognized by the XMBC scraper, I have tried <writer>foo</writer> and <writers>foo<writers> but neither of these works. I also tried the <language>English</language> tag but this was also not imported. All other fields seem to work fine.

    /Christian
     

    RoChess
    Country flag

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,260
    1,758
    As you can see by the XBMC link I pasted before, the original format has no support for language and writers (unless somebody didn't update that page).

    But that seems weird to me, so I've modified the XBMC scraper to include support for those tags, as they are important fields for Moving Pictures.

    Use the following XML syntax (this might be altered if XBMC adds support in the future and decides on a different syntax):

    For language use:

    Code:
    <language>English</language>
    For writers use:

    Code:
    <writer>
    	<name>1st Writer</name>
    </writer>
    <writer>
    	<name>2nd Writer</name>
    </writer>

    Attached is a new revision of the XBMC scraper that will support those tags.

    Please test the scraper and let me know if you encounter any problems, because if it works trouble free for you, I will add it to the SVN, so that it can be included in the next release.
     

    Attachments

    jmcentire

    Portal Pro
    November 7, 2008
    85
    136
    Home Country
    United States of America United States of America
    I am updating the Artwork/Info copier app to add the writers and language tags, but had a question while I am working on it. Seems multiple actors and writers are supported, but what about genres and directors, does it follow the same format? ie:
    Code:
    <genre>
        <name>genre 1</name>
    </genre>
    <genre>
        <name>genre 2</name>
    </genre>
    <director>
        <name>director 1</name>
    </director>
    <director>
        <name>director 2</name>
    </director>
    EDIT: From looking at the scraper, it seems it supports multiple genres through the <genre> tag but not directors...I think I'll leave genres and directors as single tags in my app to ensure compatibility with XBMC.
    Thanks
     

    RoChess
    Country flag

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,260
    1,758
    EDIT: From looking at the scraper, it seems it supports multiple genres through the <genre> tag but not directors...I think I'll leave genres and directors as single tags in my app to ensure compatibility with XBMC.
    Thanks
    Yes, it is best not to mess with anything that the XBMC standard already defines, because then an import back into XBMC might fail.

    I simply added language and writers, because there is no support in the XBMC standard, but MovingPictures can use them. According to the XML rules a program is supposed to ignore elements it doesn't recognize, so this wouldn't break XBMC ability to re-import NFO files containing these new elements. Only when they start to support the same elements, but use a different syntax, then things would get funky, but we will have to cross that bridge when we get there.
     

    Spinki

    Portal Member
    August 2, 2008
    12
    0
    Hey guys..

    Can somebody please help me!

    I have tryed to use MP artwork and info copier 0.4.1, but witout any luck

    I would like to import my nfo files offline, but it fails.

    What am i doing wrong ?


    23-Feb-2010 01:15:22 Debug [ ScraperNode]: Assigned variable: imdbid.count = 2
    23-Feb-2010 01:15:22 Debug [ ScraperNode]: Assigned variable: imdbid = tt1147684
    23-Feb-2010 01:15:22 Debug [ ScraperNode]: Assigned variable: imdbid[0] = tt1147684
    23-Feb-2010 01:15:22 Debug [ ScraperNode]: Assigned variable: imdbid[0][0] = tt1147684
    23-Feb-2010 01:15:22 Debug [ ScraperNode]: Assigned variable: imdbid[1] = tt1147684
    23-Feb-2010 01:15:22 Debug [ ScraperNode]: Assigned variable: imdbid[1][0] = tt1147684
    23-Feb-2010 01:15:22 Debug [ ScraperNode]: executing if: <if test="${imdbid[0][0]}!="><set name="movie.imdb_id" value="${imdbid[0][0]}" /></if>
    23-Feb-2010 01:15:22 Debug [ ScraperNode]: if node left value: tt1147684 right value:
    23-Feb-2010 01:15:22 Debug [ ScraperNode]: Assigned variable: movie.imdb_id = tt1147684
    23-Feb-2010 01:15:22 Debug [ ScraperNode]: Assigned variable: movie.language =
    23-Feb-2010 01:15:22 Debug [ ScraperNode]: executing parse: <parse name="writers" input="${file}" xpath="//movie/writer/name" />
    23-Feb-2010 01:15:22 Error [ ScraperNode]: Scraper Script XPATH parsing failed: Dataene på rodniveau er ugyldige. Linje 51, position 1.
    23-Feb-2010 01:15:22 Debug [ ScraperNode]: Assigned variable: movie.writers =
    23-Feb-2010 01:15:22 Debug [ ScraperNode]: executing parse: <parse name="genres" input="${file}" xpath="//movie/genre" />
    23-Feb-2010 01:15:22 Error [ ScraperNode]: Scraper Script XPATH parsing failed: Dataene på rodniveau er ugyldige. Linje 51, position 1.
    23-Feb-2010 01:15:22 Debug [ ScraperNode]: Assigned variable: genres = /
    23-Feb-2010 01:15:22 Debug [ ScraperNode]: executing parse: <parse name="genresNew" input="${genres}" regex="${rx_genres}" />
    23-Feb-2010 01:15:22 Debug [ ScraperNode]: name: genresNew ||| pattern: (?<genres>[^/]+)/ ||| input: /
    23-Feb-2010 01:15:22 Debug [ ScraperNode]: Assigned variable: genresNew.count = 0
    23-Feb-2010 01:15:22 Debug [ ScraperNode]: Parse node returned no results... <parse name="genresNew" input="${genres}" regex="${rx_genres}" />
    23-Feb-2010 01:15:22 Debug [ ScraperNode]: Assigned variable: movie.genres =
    23-Feb-2010 01:15:22 Debug [ ScraperNode]: executing parse: <parse name="actors" input="${file}" xpath="//movie/actor/name" />
    23-Feb-2010 01:15:22 Error [ ScraperNode]: Scraper Script XPATH parsing failed: Dataene på rodniveau er ugyldige. Linje 51, position 1.
    23-Feb-2010 01:15:22 Debug [ ScraperNode]: Assigned variable: movie.actors =
    23-Feb-2010 01:15:22 Debug [ DataProviderManager]: UPDATE: Title='', Provider='XBMC (Local)', Version=1.0.2, Result=SUCCESS
    23-Feb-2010 01:15:22 Info [ DBMovieInfo]: Added cover art for '' from: P:\test\Forget Me Not (2009)\folder.jpg
    23-Feb-2010 01:15:22 Info [ DBMovieInfo]: Added cover art for '' from: C:\ProgramData\Team MediaPortal\MediaPortal\Thumbs\MovingPictures\Covers\FullSize\{} [-1043796824].jpg
    23-Feb-2010 01:15:22 Debug [ ScraperNode]: Assigned variable: rx_poster_link = billede.php.fil=(?<MovieCover>[^&]+)
    23-Feb-2010 01:15:22 Debug [ ScraperNode]: executing if: <if test="${movie.site_id}!="><retrieve name="details_page_cover" url="http://www.scope.dk/film.php?id=${movie.site_id}&amp;fil=1" /><parse name="posterLink" input="${details_page_cover}" regex="${rx_poster_link}" /><!-- If link found, continue --><if test="${posterLink[0][0]}!="><set name="cover_art[0].url" value="${posterLink[0][0]}" /></if></if>
    23-Feb-2010 01:15:22 Debug [ ScraperNode]: if node left value: right value:
    23-Feb-2010 01:15:22 Debug [ ScraperNode]: executing if: <if test="${movie.site_id}!="><set name="cover_art[0].file" value="${movie.site_id}.tbn" /></if>
    23-Feb-2010 01:15:22 Debug [ ScraperNode]: if node left value: P:\test\Forget Me Not (2009)\movie right value:
    23-Feb-2010 01:15:22 Debug [ ScraperNode]: Assigned variable: cover_art[0].file = P:\test\Forget Me Not (2009)\movie.tbn
    23-Feb-2010 01:15:22 Debug [ DBMovieInfo]: File not found. System.IO.FileNotFoundException: P:\test\Forget Me Not (2009)\movie.tbn
    ved System.Drawing.Image.FromFile(String filename, Boolean useEmbeddedColorManagement)
    ved System.Drawing.Image.FromFile(String filename)
    ved MediaPortal.Plugins.MovingPictures.Database.DBMovieInfo.AddCoverFromFile(String filename)
    23-Feb-2010 01:15:22 Error [ DBMovieInfo]: Failed loading cover artwork for '' [] from P:\test\Forget Me Not (2009)\movie.tbn.
    23-Feb-2010 01:15:23 Info [ FileBasedResource]: Added cover art for "" from: http://images.themoviedb.org/posters/96607/ForgetMeNotPoster.jpg
    23-Feb-2010 01:15:23 Info [ DBMovieInfo]: Added backdrop for '' from: C:\ProgramData\Team MediaPortal\MediaPortal\Thumbs\MovingPictures\Backdrops\FullSize\{} [-1158719330].jpg
    23-Feb-2010 01:15:23 Info [ DBMovieInfo]: Added backdrop for '' from: C:\ProgramData\Team MediaPortal\MediaPortal\Thumbs\MovingPictures\Backdrops\FullSize\{} [1310170570].jpg
    23-Feb-2010 01:15:23 Info [ DBMovieInfo]: Added backdrop for '' from: C:\ProgramData\Team MediaPortal\MediaPortal\Thumbs\MovingPictures\Backdrops\FullSize\{} [692626765].jpg
    23-Feb-2010 01:15:23 Debug [ DatabaseManager]: INSERTING: DBUserMovieSettings ()
    23-Feb-2010 01:15:23 Debug [ DatabaseManager]: INSERTING:
    23-Feb-2010 01:15:23 Debug [ DatabaseManager]: INSERTING: DBSourceMovieInfo [title='', identifier='P:\test\Forget Me Not (2009)\movie', provider='XBMC (Local)']
    23-Feb-2010 01:15:23 Debug [ DatabaseManager]: INSERTING: DBSourceMovieInfo [title='', identifier='', provider='Scope.dk']
    23-Feb-2010 01:15:23 Debug [ DatabaseManager]: INSERTING: DBSourceMovieInfo [title='', identifier='27588', provider='themoviedb.org']
    23-Feb-2010 01:15:23 Debug [ DatabaseManager]: UPDATING:
    23-Feb-2010 01:15:23 Info [ MovieImporter]: Added "" (0).
    23-Feb-2010 01:15:28 Debug [ DatabaseManager]: UPDATING: DBSetting: Data Provider Management = "manual"
    23-Feb-2010 01:15:38 Debug [ DatabaseManager]: UPDATING:
    23-Feb-2010 01:15:49 Info [ MovieImporter]: Shutting Down Media Scanner Threads...
    23-Feb-2010 01:15:50 Info [ MovieImporter]: Shutting Down Path Scanner Thread...
    23-Feb-2010 01:15:50 Info [ MovieImporter]: Stopped MovieImporter
    23-Feb-2010 01:15:50 Debug [ DatabaseManager]: UPDATING:
    23-Feb-2010 01:15:50 Info [ DeviceManager]: Stopping Disk Watcher
    23-Feb-2010 01:15:50 Info [ DeviceManager]: Clearing all drives from Disk Watcher
    23-Feb-2010 01:15:50 Info [ MovingPicturesCore]: Plugin Closed
     

    ryan20021982

    Retired Team Member
  • Premium Supporter
  • June 27, 2008
    655
    86
    USA
    Home Country
    United States of America United States of America
    Hey guys..

    Can somebody please help me!

    I have tryed to use MP artwork and info copier 0.4.1, but witout any luck

    I would like to import my nfo files offline, but it fails.

    What am i doing wrong ?
    You should post this question in the MP artwork and info copier thread or make your own, not many people will look here that will help since they clicked because of the thread title which yours is not pertaining to.
     

    jmcentire

    Portal Pro
    November 7, 2008
    85
    136
    Home Country
    United States of America United States of America
    Try out the new version 0.4.1.1 - turns out the scraper doesn't work with the details link at the end of the nfo file.
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    Top Bottom