Copying your iTunes Playlists to a Synology NAS box

Published:
I have a Synology DS212+ NAS.  These are not only great for backup and normal NAS stuff, but also for delivering media throughout your home or LAN via DLNA.  I copied my whole audio collection from iTunes over to the box, but couldn't figure out how to get my extensive iTunes playlists (which, of course, are in an Apple format that DLNA doesn't recognize) over there as well.  It took me a lot of trial and error, which I intend to let you avoid by reading this.  This should work on all Synology models, as well as other (non-Synology) boxes as well, but I've only tested on the above device.  

Step One - Copy the music to the NAS from the iTunes folder.  

Note that this will retain all of your filenames and pathnames from iTunes.  Generally, you will need to get to the actual folder that contains the music (iTunes Media/Music).  Select all of the files and copy them to the NAS (on the Synology, this is done from the DSM console using the File Station application).  Copy all of the files directly into the "music" folder on the NAS.

Step Two - Convert the Playlist to a standard M3U file.

The easiest way to do this is to use Eric Daugherty's excellent "iTunes Export" software (free and open-source).  I used the GUI version, but there's an excellent (and more versatile) command-line version as well.

The "select export options" screen is where the settings are located.  On this screen, select your output directory, choose "M3U" as the playlist format, select the "Don't Copy Music" option, and blank out the "Music Folder (Prefix)".  Note that blanking it out will just put the relative path to the file.  Finally, make the playlist separator a forward slash ("/"), since your NAS is running a version of linux.

Click "next" or "finish" and your playlists will be created.  

Step Three - Edit the new M3U files


The M3U files are text files.  The most common problem is the pathnames of the files.  When the files were exported, they were all in the iTunes "Music" folder.  Consequently, "Music/" will be at the beginning of every file path.  You want to get rid of that, since your files are already in the "music" folder on your NAS.  Having Music/ as a prefix will render the file path invalid, unless, of course, you have placed everything in a folder called "Music" under the NAS "music" folder, which I didn't do.  In my case, I needed to just get rid of the "Music/" at the beginning of all of the lines.  Since you may have a lot of playlists and a lot of lines in each one, using Notepad (or a similar text editor) to do it is tedious and time-consuming.  I downloaded Notepad++, which will do a search and replace on all files in a single directory.  I searched for "Music/" in all of my M3U playlists and replaced with nothing, effectively deleting those characters from the front of every string.  Now my paths were correct and matched those on the NAS.

Step Four - Upload the Playlists

Next, I uploaded the playists to the music folder on the NAS.  Immediately, all playlists functioned completely.  I can play them from my Dish Network Hopper DVR, from WMP on other computers in my network, and from the Synology Audio app.  They work just like they do in iTunes.

Summary

Creating playlists can be time-consuming, and something that you won't want to do again and again on different platforms.  If you use iTunes, this is a good way to create a simple and efficient workflow.  Tweak your playlists in iTunes and then just export them, using the above steps, to your Synology NAS (or other DLNA compatible box).  When you modify a playlist, just go through this process and replace it on your NAS, and your playlists will always be up to date.
1
25,411 Views

Comments (2)

Commented:
I would like to use a single folder on my Synology DS413 to: 1) store all my music; 2) to be my iTunes library which will be used to maintain my iPods; 3) let me play music on other devices in my home.  I have not been able to understand the interactions between DSM's Audio Station and iTunes.  Can I accomplish my goals?

Author

Commented:
There is an option to make the Synology an iTunes server (see your Synology docs).  I do not use it that way, but I would suggest you explore that if you want to have more interaction with iTunes on your client machines.

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.