If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Tool - iTunes Playlist Import

RaccoonFinkRaccoonFink Posts: 19Members, Plex Pass Plex Pass

Since the iTunes playlist support is kinda weird and breaks if you have smart playlists, I've been looking for a way to sync my iTunes playlist into Plex. I finally gave up and wrote something myself, using Node.js.

It's pretty basic at this point, you give it your iTunes Library.xml file and Plex server info and it will make eleventy-billion queries to match up Plex songs with their iTunes equivalents and put them in playlists named after your iTunes playlists.

Things it doesn't do yet that I want it to do:

  • remove songs that have been removed from iTunes (ie, proper sync)
  • reorder songs to match the iTunes playlist (if you have moved things around)
  • delete a playlist if it's been deleted in iTunes
  • keep state and only do queries that are necessary (ie, I'd like to store some metadata about iTunes song IDs in Plex tags so I can avoid messing with already-updated stuff)

Best Answer


  • acachauacachau Posts: 83Members, Plex Pass Plex Pass

    Thanks RaccoonFink, it looks really interesting, I will follow this development.


    Plex Server :

    Mac mini 2,3 GHz Quad-Core Intel Core i7  Synology 4-bay 16TB NAS

    Plex Clients :

    Mac mini 2,5 GHz Quad-Core Intel Core i5 running PHT  AppleTV 3rd Generation running PlexConnect  RaspberryPi running RasPlex on remote Location  Plex for iOS on iPad and iPhone  Google TV

  • GewachseneGewachsene Posts: 7Members, Plex Pass Plex Pass

    Wow, I just stumbled across this on my "yearly google for a solution to finally import my iTunes playlists in Plex".
    I have Plex running on a HP Micro Gen8 with Linux, also serving the Music files and iTunes library via NFS to the Mac.

    Your tool works perfect here for that case! (running it directly on the Linux server, as a cron job)

    Big thumbs up. You made my day.

  • tinu1212tinu1212 Posts: 2Members, Plex Pass Plex Pass

    I had a bit of trouble getting this to work. Initially I tried running it on Windows 10 which failed due to a missing XML library that the itunes-db node module requires. As a workaround I used the official node:8 docker container to install and run your importer. That worked quite well until my server started timing out which lead to the script receiving ETIMEDOUT responses. But after running the script multiple times it seems like 99% of the songs have been matched to their playlists correctly.

    Maybe you could introduce a timer when the server responds with a timeout and wait a few seconds before retrying and continuing?

    Thanks a lot!

Sign In or Register to comment.