Tool - iTunes Playlist Import

other-dev

#1

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)


#2

Erp, well, I guess I hit enter before giving a link... ;)

You can get it here: https://www.npmjs.com/package/plex-itunes-import

I've only tested it on a Mac with Node v7.3.0. I'd love some feedback if anyone else is able to make it work, or has suggestions.


#3

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

Regards.


#4

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.


#5

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!