This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Import iTunes Library to Amarok

Tags: None
(comma "," separated)
ngativ
Registered Member
Posts
66
Karma
0
OS

Import iTunes Library to Amarok

Sun Jan 22, 2012 3:42 pm
Hi, is there any way to import my music collection from iTunes to Amarok?

I tried the import from iTunes but Amarok give me errors.

Import m3u playlist doesn't work either since Amarok doesn't read the m3u extended info.

Thanks
tmalik
Registered Member
Posts
1
Karma
0

Re: Import iTunes Library to Amarok

Fri Apr 05, 2013 5:01 pm
I've just been looking into this & got the same problems using Amarok 2.7 on OpenSuse 12.3.
In my case Amarok failed because the iTunes Library.xml file no longer matched what Linux/Amarok would see.

Just a bit of background:
I am just moving back to Linux after 6 years away. In that time I have built up a large iTunes Library on my Mac which I then moved to Windows 7 using iTunes built in library moving/consolidating feature. This built in feature re-writes the iTunes Library & its .xml copy to make the windows paths correct (eg C:\ instead of volumes).
I'm now dual booted with Win7 & OpenSuse with my music, win7 & suse on seperate drives each. I want to keep my existing iTunes library intact for when my wife & kids are in windows (on what windows calls its F:\ drive) so I edited a copy of the .xml library which i placed in what Linux calls /dev/sdc3 where my linux /home is. If this situation does not represent what you have you can edit the original if you know your not going back to iTunes.

If you open the .xml copy in something like kwrite you will see references to file locations using windows path naming conventions. In my case I saw:
<key>Music Folder</key><string>file://localhost/F:/Music/iTunes%20Media/</string>

key>Location</key<string>file://localhost/F:/Music/iTunes%20Media/Movies/Biometrics%20in%20Science%20Fiction/Biometrics%20in%20Science%20Fiction.m4v</string>

(Ignore the fact I had movies inside a media folder inside a music folder :) )

Here's what I did:
1) create what Amarok calls a local collection that scans the location where you are storing the iTunes music. This makes Amarok aware of the files but it doesn't move them.
2) in kwrite (working on the copy of the .xml library)
I did a Find/Replace all to look for
file://localhost/F:
and replace with
file://localhost/run/media/tmalik/Storage

It made around 10K substitutions & I didn't even have time to get out of my chair.
This results in
key>Location</key<string>file://localhost/run/media/tmalik/Storage/Music/iTunes%20Media/Movies/Biometrics%20in%20Science%20Fiction/Biometrics%20in%20Science%20Fiction.m4v</string>

(now ignore the fact that I have movies inside a media folder inside another media folder :) (you can tell how I got to this point :D )

Once complete I saved the file
3) in Amarok re-run the the import iTunes Library function using the edited .xml as the source.
4) Amarok import procedure should now work.

Problems:
Although I now have my iTunes collection, ratings, play counts etc in Amarok, I'm not convinced that the Amarok import feature (when working) imports playlists from the xml file because I cant find them. This may be me coming back to linux and not being familiar with Amarok.
User avatar
strohel
KDE Developer
Posts
54
Karma
0
OS

Re: Import iTunes Library to Amarok

Sat Apr 06, 2013 12:37 pm
Yeah, unfortunately the elaborate recipe posted by tmalik seems to be needed. Notice we have a GSoC project http://community.kde.org/GSoC/2013/Idea ... on_targets that would make it much more friendly to synchronize iTunes and Amarok statistics (most importantly matching the tracks by metadata in contrast to file paths)

Also please note that importing playlists stored in iTunes database may not be implemented at all. I think it should be possible to export those to a well-known format like .m3u, .pls or .xspf in iTunes for Amarok to read them.


Bookmarks



Who is online

Registered users: Bing [Bot], gfielding, Google [Bot], markhm, sethaaaa, Sogou [Bot], Yahoo [Bot]