INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Idea: iTunes database converter  (Read 2829 times)

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Idea: iTunes database converter
« on: July 08, 2006, 07:18:12 am »

Matt, King, the other inspired plug-in developers,


Wouldn't coding an iTunes database converter be a piece of cake for you?

Check this thread out:

...  Importing iTunes ratings would be possible if someone could make a filter for converting the XML data.

iTunes can export its library in XML format. A library export looks like this:

Code: [Select]
<?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">
<dict>
<key>Major Version</key><integer>1</integer>
<key>Minor Version</key><integer>1</integer>
<key>Application Version</key><string>6.0.1</string>
<key>Features</key><integer>1</integer>
<key>Music Folder</key><string>file://localhost/C:/iTunes/</string>
<key>Library Persistent ID</key><string>D4B7C21F164A509B</string>
<key>Tracks</key>
<dict>
<key>212</key>
<dict>
<key>Track ID</key><integer>212</integer>
<key>Name</key><string>Benzin</string>
<key>Artist</key><string>Rammstein</string>
<key>Album</key><string>Rosenrot</string>
<key>Genre</key><string>Rock</string>
<key>Kind</key><string>MPEG audio file</string>
<key>Size</key><integer>7278327</integer>
<key>Total Time</key><integer>226063</integer>
<key>Track Number</key><integer>1</integer>
<key>Year</key><integer>2005</integer>
<key>BPM</key><integer>139</integer>
<key>Date Modified</key><date>2005-12-15T15:04:25Z</date>
<key>Date Added</key><date>2005-12-15T15:04:25Z</date>
<key>Bit Rate</key><integer>254</integer>
<key>Sample Rate</key><integer>44100</integer>
<key>Rating</key><integer>80</integer>
<key>Normalization</key><integer>10493</integer>
<key>Season</key><integer>0</integer>
<key>Persistent ID</key><string>CF8B0F7744A1B440</string>
<key>Track Type</key><string>File</string>
<key>Location</key><string>file://localhost/X:/Rammstein/Rosenrot/01%20-%20Benzin.mp3</string>
<key>File Folder Count</key><integer>-1</integer>
<key>Library Folder Count</key><integer>-1</integer>
</dict>
...

MC can export and import XML in this format:

Code: [Select]
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<MPL Version="2.0">
<Item>
<Field Name="Filename">X:\Rammstein\Rosenrot\01 - Benzin.mp3</Field>
<Field Name="Artist">Rammstein</Field>
<Field Name="Album">Rosenrot</Field>
<Field Name="Name">Benzin</Field>
<Field Name="File Type">mp3</Field>
<Field Name="Genre">Rock</Field>
<Field Name="Bitrate">254</Field>
<Field Name="Image File">Rammstein - Rosenrot.jpg</Field>
<Field Name="Media Type">Audio</Field>
<Field Name="Last Played">1134658547</Field>
<Field Name="Rating">4</Field>
<Field Name="File Size">7279794</Field>
<Field Name="Duration">226</Field>
<Field Name="Number Plays">4</Field>
<Field Name="Track #">1</Field>
<Field Name="Date Created">1130368283</Field>
<Field Name="Date Modified">1130408861</Field>
<Field Name="Date Imported">1130398509</Field>
<Field Name="Replay Gain">-16,936219999999999</Field>
<Field Name="Peak Level">1</Field>
<Field Name="Intensity">5</Field>
<Field Name="BPM">139</Field>
<Field Name="Date">38353</Field>
<Field Name="Complete Album">1</Field>
<Field Name="Encoder">L397b_v2n</Field>
<Field Name="Album Rating">8</Field>
<Field Name="Lossless Archived">Y (ape + cue)</Field>
<Field Name="Album Gain">-14,9853515625</Field>
<Field Name="Sample Rate">44100</Field>
<Field Name="Channels">2</Field>
<Field Name="Bit Depth">16</Field>
<Field Name="Compression">VBR (MPEG-1.0 Layer 3)</Field>
</Item>
...
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42376
  • Shoes gone again!
Re: Idea: iTunes database converter
« Reply #1 on: July 08, 2006, 07:32:54 am »

It's a good idea Alex.

MC could support Apple's XML as a playlist (where it combines playlist "known" information with tag information as needed).  The biggest trick is that Apple used .xml as the extension so it makes file associations a little messy. (couldn't put XML in the same list as ASX, MPL, etc. because you wouldn't want to associate XML with Media Center's playlist parser)

However, I'm not sure how useful a full library converter is vs. just doing an import.
Logged
Matt Ashland, JRiver Media Center

Marty3d

  • Citizen of the Universe
  • *****
  • Posts: 1363
Re: Idea: iTunes database converter
« Reply #2 on: July 08, 2006, 09:25:44 am »

Not using iTunes and possibly out of it, I still get thrilled about this one.
How about creating some mapping functions so you can map one programs tags to MCs? That way you could for example use MP3Gains or Tag&Renames tags to match MC!
Outlook (I know we don't talk about that program, but this is not about tree killing :)), for instance, has this mapping functions for its calendar...
Logged


Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Idea: iTunes database converter
« Reply #3 on: July 08, 2006, 10:00:13 am »

It's a good idea Alex.

MC could support Apple's XML as a playlist (where it combines playlist "known" information with tag information as needed).  The biggest trick is that Apple used .xml as the extension so it makes file associations a little messy. (couldn't put XML in the same list as ASX, MPL, etc. because you wouldn't want to associate XML with Media Center's playlist parser)

However, I'm not sure how useful a full library converter is vs. just doing an import.

itunes has several fields that are not included in the mp3 tags. Rating, playcount etc. (iTunes ratings were just requested here: http://yabb.jriver.com/interact/index.php?topic=34612.0)

As we know, iTtunes users have typically also other file formats like aac/m4a and m4v video files. Mp4 tag reading is very limited in MC.

In my opinion a separate XML > MPL converter would be better than an import function. A converter could also parse the iTunes playlists (these are included in the complete XML file).
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Idea: iTunes database converter
« Reply #4 on: July 08, 2006, 11:05:48 am »

In my opinion a separate XML > MPL converter would be better than an import function. A converter could also parse the iTunes playlists (these are included in the complete XML file).
Just wondering whether the choice of the word converter and import mean one and the same.

If i imported an iTunes library into MC, is it reasonable to expect all it had to work with MC, playlists, ratings, custom tags the lot. I'm actually surprised this does not exist yet since MC is the next step after iTunes.
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Idea: iTunes database converter
« Reply #5 on: July 10, 2006, 11:14:52 am »

Matt,

It would be great if Otto would ask a question like this:

"I have found an iTunes library on your PC. Would you like to import the iTunes library data to MC?"

I found that iTunes keeps automatically an up-to-date xml copy of its database in the "C:\Documents and Settings\[username]\My Documents\My Music\iTunes" folder. The xml file is identical with an exported library file.

In case you are interested of this, here is a zip package that contains my iTunes test library (small mp3, m4a & m4v test files and a library export in XML format): iTunes.zip


For now, you could add "TIT1" ID3v2 frame support to MC11.1. (http://yabb.jriver.com/interact/index.php?topic=34634.0)

Also, POPM "Popularimeter" ID3v2 frame support should be added. Windows Media Player and several other programs use it for storing ratings. (http://yabb.jriver.com/interact/index.php?topic=33495.0)
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755
Pages: [1]   Go Up