MovingPictures Import Export GUI (1 Viewer)

thlucas

Portal Pro
February 11, 2011
133
146
Omaha, NE
Home Country
United States of America United States of America
This tool (not a plugin) allows a user to export data directly from the Moving Pictures SQLite database / file system locations to the movie library or a customized backup location. It can create individual XML files that contain information from the Moving Pictures database for storage in the movie file (or any other) location. These XML files contain all of the movie information and local media settings, as well as watched settings and custom filter (black / white) list settings. It will also copy all related cover art (cover, thumb, alternate covers, and backdrop) to the movie file (or any other) location.

Please report any bugs / feature requests to this thread.

Download / Wiki / Change Log Link

https://www.team-mediaportal.com/extensions/tools/movingpictures-import-export-gui
 
Last edited:

cubii

Portal Pro
November 1, 2006
627
32
48
Hi ,
If i understand correctly, i can use this tool, save the xml files in the movies folders and after that i can reinstall mp and moving pictures and moving pictures will read these files?

Or does it work only with this tool, so that i can use this import function to rewrite the database for moving pictures?
 

thlucas

Portal Pro
February 11, 2011
133
146
Omaha, NE
Home Country
United States of America United States of America
Hi cubii - the Moving Pictures importer will not currently read these files, but an importer script could be made to read the base movie details from the XML; note that this would NOT read the watched settings or custom filter settings, as I don't think the Moving Pictures importer scripting is that advanced (MP authors correct me if I'm wrong on that).

The files were made to work with this particular tool - the import function would then be used to insert movie details, watched settings, custom filters, etc directly into the Moving Pictures SQLite database, as well as copy artwork to the appropriate locations.[DOUBLEPOST=1373036938][/DOUBLEPOST]Here's an example of the generated XML - for the movie "Cars" (2006):

Code:
<?xml version="1.0" encoding="utf-8"?>
<MPXml MovieBasePath="D:\DVD Library\Movies\Cars\" Version="1" MPVersion="1.5.1.1487">
  <MovieInfo>
	<Title>Cars</Title>
	<Year>2006</Year>
	<IMDBId>tt0317219</IMDBId>
	<Summary>While traveling to California for the dispute of the final race of the Piston Cup against The King and Chick Hicks, the famous Lightning McQueen accidentally damages the road of the small town Radiator Springs and is sentenced to repair it. Lightning McQueen has to work hard and finds friendship and love in the simple locals, changing its values during his stay in the small town and becoming a true winner.</Summary>
	<RunTime>117</RunTime>
	<CoverFullPath>C:\ProgramData\Team MediaPortal\MediaPortal\Thumbs\MovingPictures\Covers\FullSize\{Cars} [-1380920179].jpg</CoverFullPath>
	<BackdropFullPath>C:\ProgramData\Team MediaPortal\MediaPortal\Thumbs\MovingPictures\Backdrops\FullSize\{Cars} [-820045903].jpg</BackdropFullPath>
	<CoverThumbFullPath>C:\ProgramData\Team MediaPortal\MediaPortal\Thumbs\MovingPictures\Covers\Thumbs\{Cars} [-1380920179].jpg</CoverThumbFullPath>
	<SortBy>cars</SortBy>
	<Certification>G</Certification>
	<Language>English</Language>
	<TagLine>Our Cars Speak For Themselves.</TagLine>
	<Score>7.3</Score>
	<Popularity>100</Popularity>
	<DateAdded>2013-06-12 16:55:47Z</DateAdded>
	<OriginalDirectoryName> </OriginalDirectoryName>
	<PrimarySourceScriptName>imdb.com</PrimarySourceScriptName>
	<DetailsUrl>http://www.imdb.com/title/tt0317219</DetailsUrl>
	<MpsId />
	<Actors>
	  <Item Value="Owen Wilson" />
	  <Item Value="Paul Newman" />
	  <Item Value="Bonnie Hunt" />
	  <Item Value="Larry The Cable Guy" />
	  <Item Value="Cheech Marin" />
	  <Item Value="Tony Shalhoub" />
	  <Item Value="Guido Quaroni" />
	  <Item Value="Jenifer Lewis" />
	  <Item Value="Paul Dooley" />
	  <Item Value="Michael Wallis" />
	  <Item Value="George Carlin" />
	  <Item Value="Katherine Helmond" />
	  <Item Value="John Ratzenberger" />
	  <Item Value="Michael Keaton" />
	</Actors>
	<AlternateTitles>
	  <Item Value="Bilar" />
	  <Item Value="Cars - Motori Ruggenti" />
	  <Item Value="Carros" />
	  <Item Value="Autot" />
	</AlternateTitles>
	<Directors>
	  <Item Value="John Lasseter" />
	  <Item Value="Joe Ranft" />
	</Directors>
	<Writers>
	  <Item Value="Dan Fogelman" />
	  <Item Value="Joe Ranft" />
	  <Item Value="John Lasseter" />
	  <Item Value="Jorgen Klubien" />
	  <Item Value="Kiel Murray" />
	  <Item Value="Phil Lorin" />
	</Writers>
	<Genres>
	  <Item Value="Animation" />
	  <Item Value="Adventure" />
	  <Item Value="Comedy" />
	  <Item Value="Family" />
	  <Item Value="Sport" />
	</Genres>
	<AlternateCovers>
	  <Item Value="C:\ProgramData\Team MediaPortal\MediaPortal\Thumbs\MovingPictures\Covers\FullSize\{Cars} [-1380920179].jpg" />
	  <Item Value="C:\ProgramData\Team MediaPortal\MediaPortal\Thumbs\MovingPictures\Covers\FullSize\{Cars} [850970106].jpg" />
	  <Item Value="C:\ProgramData\Team MediaPortal\MediaPortal\Thumbs\MovingPictures\Covers\FullSize\{Cars} [-666634910].jpg" />
	</AlternateCovers>
	<Studios>
	  <Item Value="Pixar Animation Studios" />
	  <Item Value="Walt Disney Pictures" />
	</Studios>
  </MovieInfo>
  <LocalMedia>
	<MediaLabel>New Volume</MediaLabel>
	<FullPath>D:\DVD Library\Movies\Cars\VIDEO_TS\Cars.avi</FullPath>
	<OriginalFileName> </OriginalFileName>
	<VolumeSerial>88BA9655</VolumeSerial>
	<DiscId />
	<FileHash>41cf62a76a8ec33c</FileHash>
	<Part>1</Part>
	<Duration>3143</Duration>
	<Ignored>false</Ignored>
	<ImportPath>
	  <Path>D:\DVD Library\Movies\</Path>
	  <InternallyManaged>false</InternallyManaged>
	  <Replaced>false</Replaced>
	</ImportPath>
	<VideoWidth>256</VideoWidth>
	<VideoHeight>240</VideoHeight>
	<VideoResolution>SD</VideoResolution>
	<VideoCodec>iv41</VideoCodec>
	<VideoFrameRate>35</VideoFrameRate>
	<VideoAspectRatio>widescreen</VideoAspectRatio>
	<VideoFormat>File</VideoFormat>
	<AudioCodec> </AudioCodec>
	<AudioChannels>0</AudioChannels>
	<HasSubTitles>false</HasSubTitles>
  </LocalMedia>
  <UserSettings>
	<UserSettingsItem>
	  <UserName>Default User</UserName>
	  <UserRating />
	  <Watched>1</Watched>
	  <ResumePart>0</ResumePart>
	  <ResumeTime>0</ResumeTime>
	  <ResumeData />
	</UserSettingsItem>
  </UserSettings>
  <WatchedHistory>
	<WatchedHistoryItem>
	  <UserName>Default User</UserName>
	  <DateWatched>2013-06-12 17:06:20Z</DateWatched>
	</WatchedHistoryItem>
  </WatchedHistory>
  <FilterWhiteList>
	<FilterWhiteListItem>
	  <FilterName>My SubTitle Level 02</FilterName>
	  <CriteriaGrouping>ALL</CriteriaGrouping>
	  <GenericType />
	  <Nodes>
		<Node>
		  <Name>My SubTitle Level 02</Name>
		  <ParentName>My Top Title With SubTitles</ParentName>
		  <MenuName />
		  <AutoGenerated>false</AutoGenerated>
		  <DynamicNode>false</DynamicNode>
		  <BasicFilteringField />
		  <BasicFilteringRelation />
		  <AdditionalSettings />
		  <SortPosition>0</SortPosition>
		</Node>
		<Node>
		  <Name>My Top Title With SubTitles</Name>
		  <ParentName />
		  <MenuName>Categories Menu</MenuName>
		  <AutoGenerated>false</AutoGenerated>
		  <DynamicNode>false</DynamicNode>
		  <BasicFilteringField />
		  <BasicFilteringRelation />
		  <AdditionalSettings />
		  <SortPosition>8</SortPosition>
		</Node>
	  </Nodes>
	</FilterWhiteListItem>
  </FilterWhiteList>
  <FilterBlackList>
	<FilterBlackListItem>
	  <FilterName>My Top Title With SubTitles</FilterName>
	  <CriteriaGrouping>ALL</CriteriaGrouping>
	  <GenericType />
	  <Nodes>
		<Node>
		  <Name>My Top Title With SubTitles</Name>
		  <ParentName />
		  <MenuName>Categories Menu</MenuName>
		  <AutoGenerated>false</AutoGenerated>
		  <DynamicNode>false</DynamicNode>
		  <BasicFilteringField />
		  <BasicFilteringRelation />
		  <AdditionalSettings />
		  <SortPosition>8</SortPosition>
		</Node>
	  </Nodes>
	</FilterBlackListItem>
  </FilterBlackList>
  <SourceMovieInfo>
	<SourceMovieInfoItem>
	  <Identifier>tt2024432</Identifier>
	  <SourceInfo>
		<SelectedScriptName>imdb.com</SelectedScriptName>
	  </SourceInfo>
	</SourceMovieInfoItem>
	<SourceMovieInfoItem>
	  <Identifier>109431</Identifier>
	  <SourceInfo />
	</SourceMovieInfoItem>
	<SourceMovieInfoItem>
	  <Identifier>tt0317219</Identifier>
	  <SourceInfo>
		<SelectedScriptName>imdb.com</SelectedScriptName>
	  </SourceInfo>
	</SourceMovieInfoItem>
	<SourceMovieInfoItem>
	  <Identifier>920</Identifier>
	  <SourceInfo />
	</SourceMovieInfoItem>
  </SourceMovieInfo>
</MPXml>
 
Last edited:

thlucas

Portal Pro
February 11, 2011
133
146
Omaha, NE
Home Country
United States of America United States of America
Updated tool to version 1.0.2.0 - added import capability, as well as detailed Excel reporting.

I marked this as a "Testing" release, as I have tested it as much as one can on MY collection of 725+ movies. My collection is mostly DVD rips (no BlueRay), with the rips residing in a file structure of "C:\Movies\movietitle (year)\VIDEO_TS\moviefile.IFO". I also tested for movie folder structures where ALL movies reside in the SAME folder structure. As always, please backup your MovingPictures.db3 database BEFORE using the import functionality. As this is a "Testing" release, there could be some unexpected behavior when writing directly to the MP database. I'm pretty anal about testing, so I'm confident that it works correctly for MY collection - but I've only tested it with MY collection, so buyer beware.

I would like to get some volunteers to send me their MovingPictures.db3 database to see how it works for different collections. I would especially be interested in collections that contain multiple filter settings. The number of movies in the collection doesn't matter, as the tool will handle pretty much anything - only limitation is memory / disk space.

Any volunteers? Please PM me if interested.
 

kszabo

MP Donator
  • Premium Supporter
  • December 6, 2007
    796
    86
    Germany, Bayern
    Home Country
    Hungary Hungary
    very nice job, even without trying this.

    I always simpy backuped my movingpictures.db file and after a new install copied back manually.... never lost any settings (OK, the covers were loaded automatically again, but who cares). What would be the advantage of your solution compared to my simple and straitforward method?
     
    Last edited:

    thlucas

    Portal Pro
    February 11, 2011
    133
    146
    Omaha, NE
    Home Country
    United States of America United States of America
    I always simpy backuped my movingpictures.db file and after a new install copied back manually.... never lost any settings (OK, the covers were loaded automatically again, but who cares). What would be the advantage of your solution compared to my simple and straitforward method?

    I tried that backup approach myself at first, which works if I don't watch very many movies or manually add movies to white / black filters. I even automated the backup to copy the DB file every week. I found that when I went to restore after a crash / reinstall, I would forget to re-flag movies with watched status and set the filters. As for covers, I also have alot of custom covers that I use. I also have a few covers that always download the incorrect cover art, and it's a pain to go i nand reset them.

    Another advantage is that I can store all of the cover art in the movie location. This allows Windows Media Center to pick up the cover art (ie folder.jpg) when displaying movies in the WMC7 interface. I primarily use MediaPortal for watching movies, but also use WMC7 once in awhile (don't hate me).

    The tool also has the capability of restoring an entire collection that was backed up on one machine, to a folder structure on another machine. For example, I have an HTPC1 downstairs that uses the following folder structure to store my movies:
    E:\Movies\movie title
    F:\Movies\movie title
    G:\Movies\movie title
    H:\Movies\movie title

    I have a an HTPC2 upstairs that uses the following structure to store its movies. Note that HTPC2 has a larger hard drive, so I only need 1 drive instead of 4 drives to house my collection:
    M:\Movies\movie title

    In this example, the HTPC2 drive M: will contain all content from HTPC1 drives E:, F:, G:, and H:. By using mapped paths, I can export my collection of movies from HTPC1 to a common location. I can then use import path mapping when importing the collection to HTPC2, which will translate all of the HTPC1 file references to HTPC2 equivalents. This makes it easier to maintain multiple images of MediaPortal.

    I guess the final thought would be the tool may not be right for everyone, but it definitely fits my needs and hopefully will fit someone else's too.

    Cheers!
     

    kiwijunglist

    Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,751
    New Zealand
    Home Country
    New Zealand New Zealand
    Code:
    <CoverFullPath>C:\ProgramData\Team MediaPortal\MediaPortal\Thumbs\MovingPictures\Covers\FullSize\{Cars} [-1380920179].jpg</CoverFullPath>
    <BackdropFullPath>C:\ProgramData\Team MediaPortal\MediaPortal\Thumbs\MovingPictures\Backdrops\FullSize\{Cars} [-820045903].jpg</BackdropFullPath>
    <CoverThumbFullPath>C:\ProgramData\Team MediaPortal\MediaPortal\Thumbs\MovingPictures\Covers\Thumbs\{Cars} [-1380920179].jpg</CoverThumbFullPath>

    would it not be better to store the images in the folder (or subfolder) with the movie and have the xml reference a relative path from the xml/movie file location. otherwise the 'backup function' of the artwork is kinda pointless because it relies on the thumbs folder being present, if you rely on the thumbs folder being present then you might as well rely on the database folder being present as well, which makes the whole 'backup' or image transfer pointless :)

    the importer tool would have the option to repopulate the thumbs folder on import
     
    Last edited:

    thlucas

    Portal Pro
    February 11, 2011
    133
    146
    Omaha, NE
    Home Country
    United States of America United States of America
    The art paths (and others) contained in the XML are really meaningless, as it will re-resolve all path-related details from where it finds the XML file. This "path resolve" processing takes place when clicking on the "Find Movies" option to search for Movie information XML files to import; fully-qualified paths are formulated using the various MovingPictures settings values, which point to the location of where the files will be copied to.

    Also note that you can export to the movie file location, or to a custom folder location. The custom folder location can also contain movie information parameters such as title, imdb id, and year.

    Also, the importer process has not only the option to import thumb images, but also the main cover, backdrop, and alternate covers. So if you only need to restore backdrops lets say, you can do that.
     

    kiwijunglist

    Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,751
    New Zealand
    Home Country
    New Zealand New Zealand
    ok i haven't tried your plugin I just felt that if you are storing db info locally with the movie you should also store the images locally with the movie. maybe you already do this, it was a bit unclear from your answer. this was only a suggestion.
     
    Last edited:

    thlucas

    Portal Pro
    February 11, 2011
    133
    146
    Omaha, NE
    Home Country
    United States of America United States of America
    To be clear, the images are stored in the same data location as the movie information XML. The data location can be either a custom folder, or where the movie file (ie VIDEO_TS.IFO) resides. The folder location as well as file names can contain movie information parameters such as title, imdb id, and year, so any of the following structures are possible:

    Scenario 1 - where the movie file resides.
    C:\Movies\Cars (2009)\MovingPictures.xml
    C:\Movies\Cars (2009)\Folder.jpg
    C:\Movies\Cars (2009)\Backdrop.jpg
    C:\Movies\Cars (2009)\Cover Alt 001.jpg
    C:\Movies\Cars (2009)\Cover Alt 002.jpg
    C:\Movies\Cars (2009)\Cover Alt 003.jpg
    C:\Movies\Cars (2009)\VIDEO_TS\VIDEO.IFO

    Scenario 2 - custom data location with movie info in seperate folders.
    C:\Movie Data Backup\Cars (2009)\MovingPictures.xml
    C:\Movie Data Backup\Cars (2009)\Folder.jpg
    C:\Movie Data Backup\Cars (2009)\Backdrop.jpg
    C:\Movie Data Backup\Cars (2009)\Cover Alt 001.jpg
    C:\Movie Data Backup\Cars (2009)\Cover Alt 002.jpg
    C:\Movie Data Backup\Cars (2009)\Cover Alt 003.jpg

    Scenario 3 - custom data location with movie info in file names in 1 folder.
    C:\Movie Data Backup HTPC1\Cars (2009).xml
    C:\Movie Data Backup HTPC1\Cars (2009) Folder.jpg
    C:\Movie Data Backup HTPC1\Cars (2009) Backdrop.jpg
    C:\Movie Data Backup HTPC1\Cars (2009) Cover Alt 001.jpg
    C:\Movie Data Backup HTPC1\Cars (2009) Cover Alt 002.jpg
    C:\Movie Data Backup HTPC1\Cars (2009) Cover Alt 003.jpg

    Hope it clears things up.
     

    Users who are viewing this thread

    Top Bottom