iTunes import fails due to Unicode in paths

Server Version#: 1.28.2.6151
Player Version#: 4.91.2
Debug Logs: Plex Media Server Logs_2022-09-22_16-55-21.zip (5.1 MB)

Seeing a number of logs like:
Could not find path: D:\Alex Shafer\Music\iTunes\iTunes Media\Music\Compilations\Rocket League × Monstercat, Vol. 1\16 Drop It.mp3

This appears to be an encoding error, as × is actually ×, and appears in the iTunes XML file as:
<string>file://localhost/D:/Alex%20Shafer/Music/iTunes/iTunes%20Media/Music/Compilations/Rocket%20League%20%C3%97%20Monstercat,%20Vol.%201/16%20Drop%20It.mp3</string>
Which correctly URL decodes to file://localhost/D:/Alex Shafer/Music/iTunes/iTunes Media/Music/Compilations/Rocket League × Monstercat, Vol. 1/16 Drop It.mp3.

As a result, a number of playlists on my system are missing their full music list due to a couple of folders with Unicode values in them.

3 Likes

I can state that this issue still occurs on Server Version 1.29.0.6244

Also experiencing this one.

Same issue here. It seems that after encountering these errors, playlists do not import at all.

Same here. Looks like a bug in how Plex decodes the iTunes XML string. I have many tracks with similarly special characters, which fail to be found. Only problematic files are skipped; the rest are added. But, yes, that means the playlist misses those tracks.

Just for kicks, I decided to try decoding all the path strings in the XML file first, and see how that would work. Even though the paths invalidated the XML file, Plex’s processor didn’t seem to care, and many of the problem tracks were included. Still not getting them all, but worth a few iterations to experiment with what’ll be accepted, since it’s unlikely this bug’ll be fixed.

FYI, there are multiple URL decoders online, and if you have a big XML file, they’ll struggle. URL Decoder/Encoder seemed to handle my big file fine.

It looks like that Plex is reading UTF-8 url-encoded characters as Windows-1252 url-encoded characters.

I have written a script that converts these UTF-8 url-encoded paths to Windows-1252 url-encoded paths so Plex reads the filenames correctly.

See here: GitHub - jsprw/plex-itunes-library-xml-converter

Thank you for the script but it’s not fully working for me. Sent you a PM about it.

Same issue here. @jesperw’s script did not work for me either

This is what I sent to ewrrod, it might help you as well:

Did you set your iTunes Library XML path to the new cleaned file? Does it fix any songs?

It could also be caused by casing in the artist names. For example, in iTunes you can have two songs with an album artist with different casings (eg Act of Rage and Act Of Rage). Because Windows is case insensitive, the iTunes XML has the casing right and thefore the the path is not correct (both songs are stored in the artist subfolder Act of Rage) while Plex looks up the subfolder Act Of Rage.

When you start the import under Playlist > Import from iTunes, you can open the console in Plex and it will show you all songs with warnings. Can you lookup those songs in iTunes, Windows Explorer and in the cleaned XML file?

If you wish, I can try to help you when you send me a PM.

Hello. Same problem here. As a european, I have many many songs with special caracters (é,è,ê,à…)

Is there a timeline for the resolution of this issue ?

1 Like

Why do you think it is unlikely this bug will be fixed?

(I am also experiencing this issue, having lots of tracks with accents. I rely on this feature to bring my iTunes playlists to Sonos via Plex. I have a large library that Sonos can’t fully index but Plex can.)

Thank you everyone!

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