Is it possible to sync iTunes' library with DVDPedia's ?

Tell us about your wildest feature dreams. Or just harmless suggestions for improvement.
Post Reply
mingmac
Junior Member
Junior Member
Posts: 3
Joined: Sun Mar 14, 2010 3:04 pm

Is it possible to sync iTunes' library with DVDPedia's ?

Post by mingmac »

I know that we can export .xml from iTunes and import by DVDPedia to make it have the same contents as iTunes'. But i was thinking if there is any way that we can auto sync (or manually export) the DVDPedia library to iTunes which might be .xml. I just think that playing those contents on Apple TV through iTunes would be easier and more stable and let DVDPedia be the best friend who manage DVDs for us. Is it possible to do this way? Thanks. :wink:
User avatar
Conor
Top Dog
Posts: 5343
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: Is it possible to sync iTunes' library with DVDPedia's ?

Post by Conor »

iTunes is very peculiar about the formats that it will support as well as import, so importing all of the information from DVDpedia will not work as DVDpedia is much more open. But if you know that all your movie can be played by iTunes you can use the following text template:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<!-- <meta name="date-format" content="YYYY-MM-dd'T'hh:mm:ss'Z'" /> -->
<dict>
	<key>Major Version</key><integer>1</integer>
	<key>Minor Version</key><integer>1</integer>
	<key>Application Version</key><string>9.0.3</string>
	<key>Features</key><integer>5</integer>
	<key>Show Content Ratings</key><true/>
	<key>Tracks</key>
	<dict><!--BeginRepeat-->
		<key>[key:uid]</key>
		<dict>
			<key>Track ID</key><integer>[key:uid]</integer>
			<key>Name</key><string>[key:title]</string>
			<key>Artist</key><string>[key:studio]</string>
			<key>Genre</key><string>Movies</string>
			<key>Kind</key><string>Protected MPEG-4 video file</string>
			<key>Year</key><integer>[key:year]</integer>
			<key>Date Modified</key><date>[key:dateEdited]</date>
			<key>Date Added</key><date>[key:dateAdded]</date>
			<key>Comments</key><string>[key:comments]</string>
			<key>Disabled</key><true/>
			<key>Track Type</key><string>File</string>
			<key>Has Video</key><true/>
			<key>HD</key><false/>
			<key>Movie</key><true/>
			<key>Location</key><string>file://localhost[linksBegin][link:url][linksEnd]</string>
		</dict><!--EndRepeat-->
	</dict>
</dict>
</plist>
Copy/paste the above to a text file and save it into your DVDpedia data folder ~/Library/Application Support/DVDpedia/Templates (you might have to create the last templates folder). Name the file iTunesExport.txt (the .txt over xml is necessary for the format of the exported linked file). From DVDpedia you can then use the export command and select iTunesExport under the text template option. The resulting file can be imported into iTunes using the File-->Library-->Import Playlist command.

There are several caveats to this. iTunes will recognize unique movies based on the file path and if a movie already exists within iTunes it will be ignored by iTunes. So you can't use the this XML export to update information from original iTunes movies unless you remove them from the iTunes listing first. On DVDpedia's part there can only be one link for each movie, as otherwise the attribute Location in the XML export will contain all the links together.

If you do use this XML export please test it first with just a handful of movies to make sure it importing new movies into iTunes before running a large import.
mingmac
Junior Member
Junior Member
Posts: 3
Joined: Sun Mar 14, 2010 3:04 pm

Re: Is it possible to sync iTunes' library with DVDPedia's ?

Post by mingmac »

Ok looks like it works well so far but I have some more questions.

1. If i also want to get the genres from DVDPedia to be added in the genre box of iTunes, can i do that?
2. Is it possible to trick iTunes that the summary of the movie from DVDPedia should be added into the Comment box (or) Description box of iTunes?
3. Any way for me to be able to embed the artwork to the file? What i have done so far is dragging it from DVDPedia and drop into the Artwork box of iTunes which is not that complicated but i just ask; maybe you have faster way.

I think that's all i need when i organize my DVDs. Thank you so much for your help.
User avatar
Conor
Top Dog
Posts: 5343
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: Is it possible to sync iTunes' library with DVDPedia's ?

Post by Conor »

For the first two you switch the above text template comments and genre line to the following:

Code: Select all

from:
         <key>Genre</key><string>Movies</string>
to:
         <key>Genre</key><string>[key:genre]</string>

And
from:
         <key>Comments</key><string>[key:comments]</string>
to:
         <key>Comments</key><string>[key:summary]</string>
As for the last requirement it''s not possible to import the artwork via the XML. If you know some AppleScript it might be easier to integrate with iTunes that way, giving you both the ability to import artwork as well as to modify the current files attributes in iTunes without having to do a new import. The iTunes AppleScript can be really complicated but i you have a very large number of movies it might be worth the time.
mingmac
Junior Member
Junior Member
Posts: 3
Joined: Sun Mar 14, 2010 3:04 pm

Re: Is it possible to sync iTunes' library with DVDPedia's ?

Post by mingmac »

Thanks so much but i got an error (-50) from iTunes while importing. Probably i put the last script in the wrong place. What i did was just copied and pasted below the <key>Location</key><string>file://localhost[linksBegin][link:url][linksEnd]</string>.
User avatar
Nora
Site Admin
Posts: 2155
Joined: Sun Jul 04, 2004 5:03 am
Contact:

Re: Is it possible to sync iTunes' library with DVDPedia's ?

Post by Nora »

You copied the entire script, including the part in the previous post? If in doubt, please send us your template so we can take a look at that here. You'll find our email on the support page.
wyced4
Junior Member
Junior Member
Posts: 3
Joined: Sun Aug 11, 2013 4:56 am

Re: Is it possible to sync iTunes' library with DVDPedia's ?

Post by wyced4 »

For some reason the iTunesExport.txt template no longer works for me. While all tags are picked up the [link:url] no longer picks up the actual url, but the get's simply repeated as text:

The template:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<!-- <meta name="date-format" content="YYYY-MM-dd'T'hh:mm:ss'Z'" /> -->
<dict>
   <key>Major Version</key><integer>1</integer>
   <key>Minor Version</key><integer>1</integer>
   <key>Application Version</key><string>9.0.3</string>
   <key>Features</key><integer>5</integer>
   <key>Show Content Ratings</key><true/>
   <key>Tracks</key>
   <dict><!--BeginRepeat-->
      <key>[key:uid]</key>
      <dict>
         <key>Track ID</key><integer>[key:uid]</integer>
         <key>Name</key><string>[key:title]</string>
         <key>Artist</key><string>[key:studio]</string>
         <key>Genre</key><string>[key:genre]</string>
         <key>Kind</key><string>Protected MPEG-4 video file</string>
         <key>Year</key><integer>[key:year]</integer>
         <key>Date Modified</key><date>[key:dateEdited]</date>
         <key>Date Added</key><date>[key:dateAdded]</date>
         <key>Comments</key><string>[key:summary]</string>
         <key>Disabled</key><true/>
         <key>Track Type</key><string>File</string>
         <key>Has Video</key><true/>
         <key>HD</key><false/>
         <key>Movie</key><true/>
         <key>Location</key><string>file://localhost[linksBegin][link:url][linksEnd]</string>
      </dict><!--EndRepeat-->
   </dict>
</dict>
</plist>

The result

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<!-- <meta name="date-format" content="YYYY-MM-dd'T'hh:mm:ss'Z'" /> -->
<dict>
   <key>Major Version</key><integer>1</integer>
   <key>Minor Version</key><integer>1</integer>
   <key>Application Version</key><string>9.0.3</string>
   <key>Features</key><integer>5</integer>
   <key>Show Content Ratings</key><true/>
   <key>Tracks</key>
   <dict>
      <key>1384</key>
      <dict>
         <key>Track ID</key><integer>1384</integer>
         <key>Name</key><string>Fast and Furious 6</string>
         <key>Artist</key><string>Universal Pictures</string>
         <key>Genre</key><string>Action, Crime, Thriller</string>
         <key>Kind</key><string>Protected MPEG-4 video file</string>
         <key>Year</key><integer></integer>
         <key>Date Modified</key><date>2013-08-11T11:13:05Z</date>
         <key>Date Added</key><date>2013-08-11T09:47:58Z</date>
         <key>Comments</key><string>Since Dom (Diesel) and Brian's (Walker) Rio heist toppled a kingpin's empire and left their crew with $100 million, our heroes have scattered across the globe. But their inability to return home and living forever on the lam have left their lives incomplete. Meanwhile, Hobbs (Johnson) has been tracking an organization of lethally skilled mercenary drivers across 12 countries, whose mastermind (Evans) is aided by a ruthless second-in-command revealed to be the love Dom thought was dead, Letty (Rodriguez). The only way to stop the criminal outfit is to outmatch them at street level, so Hobbs asks Dom to assemble his elite team in London. Payment? Full pardons for all of them so they can return home and make their families whole again.</string>
         <key>Disabled</key><true/>
         <key>Track Type</key><string>File</string>
         <key>Has Video</key><true/>
         <key>HD</key><false/>
         <key>Movie</key><true/>
         <key>Location</key><string>file://localhost[linksBegin][link:url][linksEnd]</string>
      </dict>
   </dict>
</dict>
</plist>

When I check the links tab in edit it shows this url: file:///Volumes/Video/Movies/Fast and Furious 6.m4v

What's wrong??
User avatar
Nora
Site Admin
Posts: 2155
Joined: Sun Jul 04, 2004 5:03 am
Contact:

Re: Is it possible to sync iTunes' library with DVDPedia's ?

Post by Nora »

Thanks for letting us know. You have to add this line at the top of the template:

Code: Select all

<!-- <meta name="includeLocalLinks" content="linksOnly" /> -->
With your URL, you most likely don't need the file://localhost part. It should read:

Code: Select all

<key>Location</key><string>[linksBegin][link:url][linksEnd]</string>
wyced4
Junior Member
Junior Member
Posts: 3
Joined: Sun Aug 11, 2013 4:56 am

Re: Is it possible to sync iTunes' library with DVDPedia's ?

Post by wyced4 »

Nora, Thanks for th response and apologies for the late reaction. Simply didn't find the time to try your suggestions.

Clearly adding the meta tag helped as the export now produces the link. I have removed the "localhost bit as suggested and the resulting line in the export file now reads:

<key>Location</key><string>file:///Volumes/Video/Movies/Harry%20Potter%20and%20the%20Deathly%20Hollows%20part%202.m4v</string>

Appears to be fine as the files and path name appear correct. Here's what I see in the Terminal window:

pwd
/Volumes/Video/Movies
ls -als | grep Potter
10511216 -rw-r--r-- 1 cve staff 5381739868 26 aug 20:08 Harry Potter and the Deathly Hollows part 2.m4v

Unfortunately on import of the play list in iTunes I now get an error:
"Some of the songs in the file "Export to iTunes.txt" were not imported because they could not be found."

Not sure what's going wrong here ....
User avatar
Conor
Top Dog
Posts: 5343
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: Is it possible to sync iTunes' library with DVDPedia's ?

Post by Conor »

Could be that URL should not be encoded. Try passing the file through a text editor and replacing "%20" with " " (that would be a simple space). So that the URL then reads:

Code: Select all

<key>Location</key>
<string>file:///Volumes/Video/Movies/Harry Potter and the Deathly Hollows part 2.m4v</string>
If that works do let me know so I can look at updating the txt export to take that into account if possible.
wyced4
Junior Member
Junior Member
Posts: 3
Joined: Sun Aug 11, 2013 4:56 am

Re: Is it possible to sync iTunes' library with DVDPedia's ?

Post by wyced4 »

I have tried with encoding and without, played with the file and localhost addition, but all to no avail. Even if I create a playlist in iTunes, export it and re-import, nothing happens. The only observation I have made is that without the file: "statement" in the link, the error disappears (but no file is imported).

I'm really puzzled, as they txt export template used to work very well until recently....
User avatar
Conor
Top Dog
Posts: 5343
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: Is it possible to sync iTunes' library with DVDPedia's ?

Post by Conor »

It's quite a mystery. It's likely iTunes changed something in the latest version as importing information and updating iTunes is not something that supported but at least was possible. I'll test out other changes see if there is a fix.
Post Reply