audiostation

Exporting playlists from iTunes to Synology Diskstations

I have a nice D211j “Diskstation” NAS, which essentially stores all music, photos and videos in a central place. Besides being a storage device, Synology builds in a nice MediaServer that streams this music, photos and videos to streaming clients around my place (including iTunes via the iTunes Media Server).

The built in “AudioStation” is essentially a iTunes-esque library that shows all the music that you’ve copied into the /music folder on the Synology NAS. So far so good. However, I have tons of music and while copying the files from iTunes to the NAS was easy, it does not transfer any ratings, play counts or playlists. So if I want to play any specific song on, say, the PS3, I need to click through tons of folders to hunt down the file manually. However, at least for the latter there is a relatviely simple way. This assumes that you’ve copied everything that was under

~/Music/iTunes/iTunes Media/Music

into the root of the /music volume on your Diskstation.

First, export any playlist you want to have on the Diskstation from iTunes into a file. In iTunes, just click on the playlist and then go to File / Library / Export Library:

Make sure to save the file in “M3U” format.

Now fire up your favorite text editor and open the file. M3U files are simple text files that contain the location of the song file. iTunes exports those as an absolute path, so we need to correct that. Search and replace the string (changing “Username” for your username of course)

/Users/Username/Music/iTunes/iTunes Media/Music/

and replace it simply with

../

Save the fie and copy it to the folder /music/playlists (create it if it doesn’t exist yet).

The AudioStation will recognize the file as a playlist.

Nice side-effect: AudioStation also allows you to download the files of that playlist from the NAS in one go.