Open qoxxxx opened 7 years ago
Can you instead change "realpath" to say "normpath" and see if it fixes it? I think that will make the old stuff work and no longer follow symlinks (which i consider the preferred behavior).
And thanks :D
normpath
is working fine for me, thanks.
thanks for this tool, very useful to import lots of playlists
I had a similar problem to the OP , Plex for me runs in a jail on my FreeNAS so the full path to files is something like /mnt/tank/<user>/media/music/<artist>/<track>
the media folder is then mounted in the jail as /media
so in the Plex DB the entries to files entries are /media/music/<artist>/<track>
so was getting lots of errors with files paths not matching between .m3u and DB
workaround was to use the fix described here for relative/absolute paths and also editing line 40 to ensure what was pulled from the .m3u playlist went into the PlaylistFiles output in the correct format to include the leading /
of the mount point in the jail
My music library folder have symlinks pointing to tracks from all over .. For example,
/plex/music_folder/symlink_of_track1.mp3
, which points to/hard/drive/track1.mp3
So Plex only knows/plex/music_folder/symlink_of_track1.mp3
, not/hard/drive/track1.mp3
The problem is PlexPlaylistImporter converts the symlink path to the path it points to, so it can't find the track in the database.
The line responsible is in
M3U.py
, line 31LookupPath=os.path.realpath(('' if IsAbsolutePath else PlaylistDirPath)+LineStr.rstrip('\n'))
Replacing it by
LookupPath=LineStr.rstrip('\n')
does the trick.I can see it's there to support relative path, but I'm guessing converting symlinks is a side effect.
PS: PlexPlaylistImporter is an awesome contribution ! I can't believe Plex doesn't support it still..