Import from MyFilms? (1 Viewer)

wamps

Portal Member
July 26, 2007
5
4
Hamburg, Germany
AW: Import from MyFilms?

Hi, I have lately built a scraper for my AMC-DB, it identifies the movie via the "Source" field, where I store the movie filepath/es.
You can try it out, if you use another field, just replace the "@Source" with the field you use. Furthermore you have to define the variables "amc_DB" and "cover_path" as your DB path, default is "c:\db\db.xml" respectively "c:\db\".
The scraper requires at least version 1.0.2, otherwise there might occure problems with the file encoding.
 

Attachments

  • amc.xml
    30.6 KB
  • amc_1.0.1.xml
    4.3 KB

davisss

Portal Member
March 9, 2010
13
0
Home Country
Spain Spain
Hello friend:

With this file. XML is possible to export an XML file exported from "Ant Movie Catalog?.
In that directory there to save the file?.
As should be separated to different parts of the movie so you can correctly bind Moving Pictures?

thank you very much.

sorry for the translation of google.


Hola amigo:

Con este archivo .XML es posible exportar un archivo XML exportado desde "Ant MOVIE CATALOG" ?.
En que directorio hay que guardar el archivo?.
Como hay que separar a las diferentes partes de la pelicula para que pueda enlazarlo correctamente Moving Pictures?

muchas gracias.
 

Helios61

Retired Team Member
  • Premium Supporter
  • January 30, 2008
    4,587
    873
    62
    NRW
    Home Country
    Germany Germany
    AW: Import from MyFilms?

    Hi, I have lately built a scraper for my AMC-DB, it identifies the movie via the "Source" field, where I store the movie filepath/es.
    You can try it out, if you use another field, just replace the "@Source" with the field you use. Furthermore you have to define the variables "amc_DB" and "cover_path" as your DB path, default is "c:\db\db.xml" respectively "c:\db\".
    The scraper requires at least version 1.0.2, otherwise there might occure problems with the file encoding.

    Hi wamps!

    I have tried again your script, but unfortunatly it doesn't work! Probably i am doing something wrong, please take a look at the screenshot! I hope, you can help! "movingpictures.log" (Debug), "ant.xml" (modified) and my "antmoviedatabase.xml" are attached!

    Best regards

    Helios
     

    Attachments

    • Bild_009.jpg
      Bild_009.jpg
      84.6 KB
    • amc.xml
      3.9 KB
    • antmoviedatabase.xml
      1 MB

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Re: AW: Import from MyFilms?

    I have tried again your script, but unfortunatly it doesn't work! Probably i am doing something wrong, please take a look at the screenshot! I hope, you can help! "movingpictures.log" (Debug), "ant.xml" (modified) and my "antmoviedatabase.xml" are attached!

    The problem is that MovPic finds a bunch of VIDEO_TS.IFO files that it expects to be a mediafile, so it does the import on them.

    AMC scraper then compares this to all the VIDEO_TS.IFO entries found in your michael.xml AMC database. This is the source of the problem as it would match up correctly to the first VIDEO_TS.IFO entry found without doing a proper name comparison.

    You would have to use a modified version of the scraper script that tries to detect if VIDEO_TS.IFO is last part of the filename, and to then use the foldername for the match.

    This is why "Dixie Chicks - Top of the World Tour Live.mkv" matches up without a problem.

    I'll wait for wamps to make the modifications to the script, but otherwise I can lend a hand.
     

    Helios61

    Retired Team Member
  • Premium Supporter
  • January 30, 2008
    4,587
    873
    62
    NRW
    Home Country
    Germany Germany
    AW: Re: AW: Import from MyFilms?

    I have tried again your script, but unfortunatly it doesn't work! Probably i am doing something wrong, please take a look at the screenshot! I hope, you can help! "movingpictures.log" (Debug), "ant.xml" (modified) and my "antmoviedatabase.xml" are attached!

    The problem is that MovPic finds a bunch of VIDEO_TS.IFO files that it expects to be a mediafile, so it does the import on them.

    AMC scraper then compares this to all the VIDEO_TS.IFO entries found in your michael.xml AMC database. This is the source of the problem as it would match up correctly to the first VIDEO_TS.IFO entry found without doing a proper name comparison.

    You would have to use a modified version of the scraper script that tries to detect if VIDEO_TS.IFO is last part of the filename, and to then use the foldername for the match.

    This is why "Dixie Chicks - Top of the World Tour Live.mkv" matches up without a problem.

    I'll wait for wamps to make the modifications to the script, but otherwise I can lend a hand.

    Hi RoChess!

    Big :D for information and Thanks for helping!

    Helios
     

    eric.esser

    MP Donator
  • Premium Supporter
  • May 17, 2009
    2
    1
    Hey RoChess,
    Thanks a lot for that script, I was looking forward for that!
    I do not get it running correctly, though. It seems to not start at all recognizing the movies. I turned on the debug-mode to get from the movingpictures.log whats going wrong, but it does not have as much information as I was hoping to find in there. The import, basically just keeps telling me that there is no exact match for all 800 of my movies (the log is on the first 3 of them, I spared you the rest...) - do you have any hint for me where to start the search what went wrong on my import?
    Thanks!
    Eric
     

    Dewey

    Portal Member
    November 14, 2007
    5
    0
    Hey All,

    Did anyone ever get wamps' scraper to work? or any other method for that matter?

    I'd also like to migrate from MyFilms(AMC xml) over to Moving Pictures - I have a lot of films which weren't auto-matched with AMC and don't really want to have to manually rebuild up my database from scratch again. The idea of scraping from the original xml sounds like a great solution but my coding skills aren't the best and the movingpictureslog doesn't add much to the debugging - just says movie can't be found :(

    Thanks,
    Dwight
     

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    Moving-Pictures has a hidden 'scraper debug' mode (under gear icon inside scraper configuration -- activates little green bug icon, graphical step-by-step explanation on IMDb+ wiki)... this gives you a giant amount of information on what exactly is happening, so much in fact that a single movie import can run into 1MB of logging. This is why it is obviously not enabled by default :)
     

    Dewey

    Portal Member
    November 14, 2007
    5
    0
    Hi RoChess,

    I had the debugger on but I wasn't enabling the additional MePo debugger also - got the full log and worked out the problem, the scraper wamps provided appeared to be re-uploaded with a change to it to support Helios61s' later query (searching via @URL rather than @source). I corrected this and got it working.

    I've got a follow up question for you on this if you know the answer; I've spent the last few days learning/understanding Xpath and I now have a rough idea but I'm getting held up on an issue - hoping you can give some guidance.

    This is the code that wamps uses to search the AMC xml for matches;

    <retrieve name="file" file="${amc_DB}" encoding="iso-8859-1" />​
    <parse name="mov" input="${file}" xpath="${search}" />

    <loop name="movs" on="mov">
    <set name="movie[${count}].title" value="${mov[${count}].@TranslatedTitle}" />
    <set name="movie[${count}].alternate_titles" value="${mov[${count}].@OriginalTitle}" />
    <set name="movie[${count}].year" value="${mov[${count}].@Year}" />
    <subtract name="movie[${count}].popularity" value1="100" value2="${count}"/>
    <set name="movie[${count}].site_id" value="${mov[${count}].@Number}" />
    </loop>
    My problem is that I have several boxsets in AMC (where '\' in the title identifies the boxset) which means that the title comes into MovingPictures with the slash;
    Evil Dead\Evil Dead
    Evil Dead\Evil Dead II: Dead by Dawn
    Evil Dead\Evil Dead III - Army of Darkness​

    What I'd like to do is use the Xpath functions substring-after to assign the title/alt_title and use the substring-before to set the collections field. I just don't know how to write the syntax correctly :( I'd also need to wrap this into an if statement so that the substring function only happens on boxsets :( :(

    <retrieve name="file" file="${amc_DB}" encoding="iso-8859-1" />​
    <parse name="mov" input="${file}" xpath="${search}" />

    <loop name="movs" on="mov">

    <!-- Modify title if its a BoxSet-->
    <substring-after name="newtitle[${count}]" input="${mov[0].@TranslatedTitle}" string="\" />
    <set name="movie[${count}].title" value="${newtitle}"/>
    <substring-after name="newalttitle[${count}]" input="${mov[0].@OriginalTitle}" string="\" />
    <set name="movie[${count}].alternate_titles" value="${newalttitle}"/>

    <substring-before name="newcollections[${count}]" input="${mov[0].@TranslatedTitle}" string="\" />
    <set name="movie[${count}].collections" value="${newcollections}"/>


    <set name="movie[${count}].year" value="${mov[${count}].@Year}" />
    <subtract name="movie[${count}].popularity" value1="100" value2="${count}"/>
    <set name="movie[${count}].site_id" value="${mov[${count}].@Number}" />
    </loop>​

    This code doesn't actually give an error, it just provides null values into the title, alt_title & collections fields.

    Is this code even possible? I've attached the various docs in case it helps.

    Cheers,
    Dwight
     

    Attachments

    • MyFilmsDB - Lite.xml
      5.8 KB
    • AMC_to_MP_1.03.xml
      5 KB

    RoChess

    Extension Developer
  • Premium Supporter
  • March 10, 2006
    4,434
    1,897
    That is where I would just use MovPic scraper engine power to do it with. Regular Expression to detect/extract/use it if it's there, or ignore when it is not.

    Code:
    ^(?:(?<boxSet>[^\\]+)\\)?(?<title>.+?)$

    And that's all you need. Well you need more, but read up on RegExp usage then, or examine how I do it in IMDb+ source code.
     

    Users who are viewing this thread

    Similar threads

    I have all of my media on a NAS. I guess it might just be a network issue, then.
    I have all of my media on a NAS. I guess it might just be a network issue, then.
    Whenever I go into the back end for Moving Pictures, it almost immediately hangs on the Movie Importer tab. If I want to go into...
    Replies
    4
    Views
    363
    So not 100% sure if this is a MyTVSeries or FanArt issue, but the episode thumbnails always revert to the series default after restart. If you go to an episode and open the options and pick choose artwork then choose episode thumbnail it shows the correct thumbnail and says it is remote. Click on it and it goes local instantly and...
    So not 100% sure if this is a MyTVSeries or FanArt issue, but the episode thumbnails always revert to the series default after...
    So not 100% sure if this is a MyTVSeries or FanArt issue, but the episode thumbnails always revert to the series default after...
    Replies
    0
    Views
    212
    in MP config goto plugins -> MovingPictures and open the config. There you can delete the wanted movies ;)
    in MP config goto plugins -> MovingPictures and open the config. There you can delete the wanted movies ;)
    I am using MediaPortal 1.30 and Moving Pictures. In fact, I have been using them for so long that my movie list is now... a mess...
    Replies
    1
    Views
    685
    Yes, unfortunately, this would need a code change to support it. Next time I'm doing something on the plugin I'll try and remember to add support for this sort order.
    Yes, unfortunately, this would need a code change to support it. Next time I'm doing something on the plugin I'll try and...
    Hi, I was wondering if there is anyone who might be able to help me out. Is there a way to either use the sort feature and/or a...
    Replies
    6
    Views
    783
    Ok some good news after much tearing out of hair lol as i refuse to be beaten at problem solving i managed to find out where EPG Collector gets its epg from and found it gets it from 'freesathome' so cribbed the settings from that and added the freesathome channel to the radio channels and selected that channel only to collect epg...
    Ok some good news after much tearing out of hair lol as i refuse to be beaten at problem solving i managed to find out where EPG...
    Hi folks Ive just started using epg collector to import uk freesat epg into mediaportal i have had good success with it so far and...
    Replies
    7
    Views
    1K
    Top Bottom