iTunes import tips

I’ve spent a couple days pulling my hair out trying to do a one-time import of my iTunes library into Plex on FreeNAS. I specifically wanted ratings.

Though some posts here were helpful, it took a lot of piecing together, guessing, and trying to understand how Plex does stuff to figure it out, so I thought I’d share my experience.

Important thing up front: it’s impossible to import iTunes information into Plex using FreeNAS/FreeBSD. FreeBSD is listed as an unsupported platform for premium features because apparently Gracenote doesn’t support it, meaning you cannot create a premium music library. The UI mostly reflects this, omitting the ‘Options’ tab, but in the ‘Advanced’ tab you still have the option to import iTunes information. Assuming that the checkbox to import my iTunes library would allow me to import my iTunes library, I spent a solid day trying to figure this out, tweaking my paths, combing the logs, but nothing worked. If anyone else has figured this out and can prove me wrong, awesome.

Solution - Do your import elsewhere
I spun up a fresh Ubuntu/Plex install, which allows me to create a premium library. I was then able to import my music/iTunes library, and then copied the Plex library/database files from Ubuntu to the FreeNAS installation.

I know a lot of people maintain their iTunes library, but I just wanted to get everything over once and for all, so this doesn’t fit everyone’s bill. Additionally, I didn’t have any existing libraries in Plex that I cared about. To my knowledge, you can’t merge libraries from different installations, so once I copied over the music library from Ubuntu to FreeNAS, I had to rebuild my movie/TV show libraries.

Tips for iTunes Music Library.xml

The file paths from a Windows iTunes installation will look something like this:

file://localhost/C:/Users/-/Music/iTunes/iTunes%20Media/Music/Flogging%20Molly/Whiskey%20On%20A%20Sunday/01%20Laura.mp3

They need to be changed to where they currently are. For me it looked like this:

file://localhost/mnt/library/Music/iTunes/iTunes%20Media/Music/Flogging%20Molly/Whiskey%20On%20A%20Sunday/01%20Laura.mp3

Notes:

  • For me, localhost was not necessary. When omitted, you do have three slashes in a row (file:///mnt/library…), which looks odd but is valid. Check out the Wikipedia entry for details about how the path should look.
  • To quickly verify that the path is valid, copy and paste it into a browser and you’ll be directed to the song. This should be done from the computer that Plex is on. Of course the files must be locally accessible also.
  • Since I created the library on one computer and then moved it to another, I ensured the music files were in the same mount point.

Tips for testing

  • Ratings are added while everything is being scanned, so if you don’t see ratings populating in a minute or two after creating the library, it’s probably not working.
  • And if it’s not working and you have a massive amount of music, consider using maybe one album’s worth of music for testing purposes. This way you don’t have to wait for 100GB library to be scanned before concluding that something isn’t working. I trimmed everything but that one album from iTunes Music Library.xml also.
  • I didn’t find the log files to be helpful at all. Maybe (hopefully) I just missed relevant entries. When trying to create the library with the FreeNAS install of Plex, the logs would indicate that iTunes Music Library.xml was added to be scanned, but nothing else beyond this.

Hope this helps someone.

Server Version#: 1.13.9.5456
Player Version#:

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.