Using your iTunes xml file with Linux PlexMediaServer
My home network setup consists of a Linux box (running Linux Mint), a “Hackintosh” (a hp compaq 6000 pro small form factor pc running macos sierra), a mac mini (macos sierra also hacked to install on a 2009 mac mini), and then a laptop running RHEL6. I also have a 2 disk buffalo NAS and a 2 disk lenovo NAS with a 4 bay SATA enclosure with 2x2TB disks hanging off it.
My Linux server runs several different background services for my primary source of streaming video to my roku – these consist of sabnzbd+, sonarr, and plexmediaserver. On my buffalo NAS I have almost 18000 mp3s which are mounted as /Volumes/Music and added to my itunes library on the mac mini. This same NAS share is mounted as /Music on the Linux Mint machine.
Here’s how I got them into the iTunes channel in plex.
- First you need to set the option in iTunes to share its library via an XML file.
- This will put a file called iTunes Music Library.xml in your “Music” folder.
- via cron or something, set up a process to copy this file over to the /Music share on the linux server and post process it to change the Location tag – /Volumes/Music/Music needs to become just /Music/Music :
# scp mini2:Music/iTunes*.xml /Music/itunes_temp.xml
# cat /Music/itunes_temp.xml | sed ‘s%/Volumes%%’ > /Music/iTunes\ Music\ Library.xml
- In the server settings for Plex Media Server, there is option under Server -> Channels (click “Advanced”) and you can enable the iTunes channel. Enter /Music/iTunes Music Library.xml in the box “
- Restart plexmediaserver :
# sudo systemctl restart plexmediaserver.service
Enjoy your itunes music in plex. Now just to figure out how to get Alexa to play it back 🙂