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,586
    875
    64
    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,586
    875
    64
    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 think info but I'm really not sure
    i think info but I'm really not sure
    When I import new films using Moving Pictures, it takes an incredibly long time for the information to be found and downloaded...
    Replies
    3
    Views
    689
    Actually, you just reminded me of how I have handled this in the past: I merged the contents of an old export.xml with a new one to make a complete file containing the old values I needed and the new values I didn't want to change. Why should it matter if the export file is missing some values? I would expect the import process to...
    Actually, you just reminded me of how I have handled this in the past: I merged the contents of an old export.xml with a new one to...
    My "fresh install" is missing some settings (in particular genre maps) that I would like to import from a previous export. There...
    Replies
    2
    Views
    710
    I made some updates to the Wiki page describing the <import> and <include> tags, including adding a couple of new xml examples. For the first example, I highlighted the example text and eventually found the location in the menus where I could select the CODE macro to have the example text formatted as a code example. So far, so good...
    I made some updates to the Wiki page describing the <import> and <include> tags, including adding a couple of new xml examples. For...
    I made some updates to the Wiki page describing the <import> and <include> tags, including adding a couple of new xml examples. For...
    Replies
    0
    Views
    519
    After Tv Movie EPG Import++ is unrepairable, I tried Tv Movie EPG Import. Unfortunately, the import gets stuck here. Does anyone have an idea why this could be, or does it still work for anyone at all?
    After Tv Movie EPG Import++ is unrepairable, I tried Tv Movie EPG Import. Unfortunately, the import gets stuck here. Does anyone...
    After Tv Movie EPG Import++ is unrepairable, I tried Tv Movie EPG Import. Unfortunately, the import gets stuck here. Does anyone...
    Replies
    0
    Views
    937
    Isn't there anyone who needs the series episode listings in the EPG? Perhaps someone could move this post to the English forum.
    Isn't there anyone who needs the series episode listings in the EPG? Perhaps someone could move this post to the English forum.
    Since EPG Buddy is no longer working and the 'TV Movie EPG Import ++' plugin is working again, I'm now having trouble completing...
    Replies
    1
    Views
    2K
    Top Bottom