Import from MyFilms? (3 Viewers)

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
    63
    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
    63
    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


    Write your reply...

    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
    1K
    If your XMLTV guide isn’t populating, setting up an EPG Collector can solve the issue by giving you control over your guide data. This tool lets you customize the EPG to match your needs, ensuring accurate and complete listings. The main benefit of using an EPG Collector is flexibility. You can pull data from reliable sources, adjust...
    If your XMLTV guide isn’t populating, setting up an EPG Collector can solve the issue by giving you control over your guide data...
    Hi everyone, I hope you are all well My Mum's Mediaportal lost it's marbles thanks to Microsoft update, (even though I had update...
    Replies
    3
    Views
    317
    I was installing/upgrading x64 over x86. These 2 problems did not occur when installing/upgrading x86 over x86. All is good. Now running 1.35 x86 with no problem. Thank you
    I was installing/upgrading x64 over x86. These 2 problems did not occur when installing/upgrading x86 over x86. All is good. Now...
    Good day, 2 problems after upgrading to 1.34 from 1.33: 1- To avoid error message TuningParameters not found when starting...
    Replies
    1
    Views
    676
    I was installing/upgrading x64 over x86. These 2 problems did not occur when installing/upgrading x86 over x86. All is good. Now running 1.35 x86 with no problem. Thank you
    I was installing/upgrading x64 over x86. These 2 problems did not occur when installing/upgrading x86 over x86. All is good. Now...
    Good day, Same 2 installation problem as last version. 2 problems after upgrading to 1.35 from 1.34: 1- To avoid error message...
    Replies
    1
    Views
    691
    I've made changes to the media-playing overlays in BasicHome.xml and musicOverlay.xml, but I'm having difficulty finding the video-playing overlay used for the other screens. Isn't there a single overlay .xml that displays in MyVideo, MyMusic, TVSeries, MovingPictures, etc. like the musicOverlay.xml does? Thanks! Update: ... Ooops...
    I've made changes to the media-playing overlays in BasicHome.xml and musicOverlay.xml, but I'm having difficulty finding the...
    I've made changes to the media-playing overlays in BasicHome.xml and musicOverlay.xml, but I'm having difficulty finding the...
    Replies
    0
    Views
    433
    Top Bottom