Page 1 of 1

How do I import playlists from iTunes library.xml ?

Posted: 17 Jul 2022 01:32
by AudioArchivist
I'm totally new to VLC and smartphones. I've been using iTunes on my PC forever, and since Apple wants a monthly subscription fee to play the music I already own, here I am. I've imported the music, but I have about 200 playlists in iTunes. When I hit the playlist icon, it doesn't recognize anything being there, even though I exported the library with all its playlists to library.xml and copied it to my phone's music folder. What do I need to do to get my playlists in VLC without having to re-make every playlist? Thanks in advance.

Re: How do I import playlists from iTunes library.xml ?

Posted: 17 Jul 2022 03:09
by Spike1
Before someone authoritative wanders in: You are able to play individual media but just need help with the playlists?

And a guess: Importing media to your phone probably changed the pathname. Do the paths in your .xml files still make sense on your phone?

Re: How do I import playlists from iTunes library.xml ?

Posted: 17 Jul 2022 17:32
by AudioArchivist
Yes, I can play the music individually. Looking at the XML file, each playlist points to numbered songs (I'm assuming it's indexed somehow). When you look at each individual song, the paths are windows paths, so yes, they'll be different from the paths on the phone. However, if it's a string replacement that needs to happen, I can do that. I just need to know what to replace the windows paths with.

Re: How do I import playlists from iTunes library.xml ?

Posted: 18 Jul 2022 04:30
by Spike1
I don't know the answer. While waiting for an expert, you could create a VLC playlist and see what its paths look like. They might vary by device.

Re: How do I import playlists from iTunes library.xml ?

Posted: 18 Jul 2022 09:31
by AudioArchivist
Good idea, I'll check that out.

Re: How do I import playlists from iTunes library.xml ?

Posted: 18 Jul 2022 18:02
by AudioArchivist
Okay, so where do I find the playlist that I just created in VLC? It's not showing up in my phone's files anywhere.

Re: How do I import playlists from iTunes library.xml ?

Posted: 18 Jul 2022 18:18
by Spike1
On mine, it's Android/data/org.videolan.vlc/files/medialib/playlists

With each new Android version, Google tries harder to isolate each app to a world of its own that other apps can't enter.

Re: How do I import playlists from iTunes library.xml ?

Posted: 18 Jul 2022 18:31
by Gracus36
On mine, it's Android/data/org.videolan.vlc/files/medialib/playlists

With each new Android version, Google tries harder to isolate each app to a world of its own that other apps can't enter.
I think it is not accessible with default file manager.

May need to install another one.

Re: How do I import playlists from iTunes library.xml ?

Posted: 18 Jul 2022 19:08
by AudioArchivist
Never mind, I found it. Okay, here's how you can import single playlists into VLC from iTunes using only Windows Notepad.

1. Export playlist from Itunes. File->Library->Export Playlist, Save as M3U file (*.M3U, not *.M3U8).
2. Open the .M3U playlist file in Notepad and replace all the backslashes ("\") with slashes ("/").
3. Change the windows pathnames from "C:/Users/_username_" to "/storage/emulated/0", which is the Android root folder. Your file lines should look like this example:
/storage/emulated/0/Music/iTunes/iTunes Media/Music/A Perfect Circle/eMOTIVe/01 Annihilation.m4a
This assumes you stored your iTunes directory in the Music folder on your phone.
4. Save the M3U file.
5. Plug your phone into your computer, and copy the M3U file to your music folder. If you have VLC open, you may need to leave the app and re-enter it so it "discovers" the playlist (the app needs a Refresh button).
6. Once the app refreshes, your playlist should be there and fully functional (I just did it myself).

The biggest problem is that you can't export all of your playlists as M3U files at once. I'm going to try to figure out if I can parse the library.xml file and make a conversion routine. I've got around 200 playlists, so doing all of them would be a pain. If I can figure out how to do it easily, I'll post it here.