Hello,
My name is Antony and first of all, thanks for this project !
I am trying to use it on my Plex server running on a QNAP TS-251+. I know it it not an usual linux distro but with the correct paths, it should work.
1 - Plex directory layout
I had to change some things to make PlexPlaylistImporter.py work :
Line 93 old :
PlexDBPath=(os.environ['PLEX_HOME']+'/Library/Application Support/Plex Media Server/' if 'PLEX_HOME' in os.environ else '')
Line 93 new :
PlexDBPath=(os.environ['PLEX_HOME']+'/Library/Plex Media Server/' if 'PLEX_HOME' in os.environ else '')
I had to delete Application Support from the PlexBDPath variable since the Qnap package of Plex Server seems to have a different directory layout then the one your script expects.
2 - Symbolic links
I also struggled with the symbolic links made by the QNAP OS but printing what MP.file gave from the Plex database, i was abble to set the correct path in my .m3u files.
Here is the code I added toPlexPlaylistImporter.py (line 138) to determine the path used by Plex database:
Cur.execute('SELECT MP.file FROM media_parts AS MP INNER JOIN media_items AS MI ON MI.id=MP.media_item_id COLLATE NOCASE',)
for row in Cur:
print(row[0])
print("FilePath = " + FilePath)
This way I could compare the path given by my playlist and the one stored in the Plex database. Of course, I deleted this code as soon I figured out the correct path.
I have .m3u8 files ( from the PowerAmp Android app) to be precise but the patern is exactly the same : absolute path to the files and one file per line.
Final playlist file
Here is a sample of my playlist files :
/share/CE_CACHEDEV1_DATA/.qpkg/CodexPack/mnt/share/CE_CACHEDEV1_DATA/Multimedia/MUSIQUE/Morceaux/Grand Corps Malade_Midi 20/13 Grand Corps Malade - Vu De Ma Fenêtre.flac
/share/CE_CACHEDEV1_DATA/.qpkg/CodexPack/mnt/share/CE_CACHEDEV1_DATA/Multimedia/MUSIQUE/Morceaux/Grand Corps Malade_Midi 20/14 Grand Corps Malade - Rencontres.flac
/share/CE_CACHEDEV1_DATA/.qpkg/CodexPack/mnt/share/CE_CACHEDEV1_DATA/Multimedia/MUSIQUE/Morceaux/Grand Corps Malade - 3eme Temps/03-grand_corps_malade-a_lecole_de_la_vie.mp3
My issue
With my .m3u8 modified with correct paths and the PlexPlaylistImporter.py file edited, i successfully imported the playlists according to the script output but I can't see any of my playlists in Plex, even after rebooting the NAS :
> PlaylistImporter -f /share/CE_CACHEDEV1_DATA/Multimedia/MUSIQUE/Playlists/Slam.m3u8
> Playlist name (Cannot be blank): Slam
> 59 items imported
I know my use case is quite unusual but I hoped that you may have an idea about why the playlists don't show up at all in Plex even with a successfull output from your script.
Regards
Antony
Hello,
My name is Antony and first of all, thanks for this project !
I am trying to use it on my Plex server running on a QNAP TS-251+. I know it it not an usual linux distro but with the correct paths, it should work.
1 - Plex directory layout
I had to change some things to make
PlexPlaylistImporter.pywork :I had to delete
Application Supportfrom thePlexBDPathvariable since the Qnap package of Plex Server seems to have a different directory layout then the one your script expects.2 - Symbolic links
I also struggled with the symbolic links made by the QNAP OS but printing what
MP.filegave from the Plex database, i was abble to set the correct path in my.m3ufiles.Here is the code I added to
PlexPlaylistImporter.py(line 138) to determine the path used by Plex database:This way I could compare the path given by my playlist and the one stored in the Plex database. Of course, I deleted this code as soon I figured out the correct path.
I have
.m3u8files ( from the PowerAmp Android app) to be precise but the patern is exactly the same : absolute path to the files and one file per line.Final playlist file
Here is a sample of my playlist files :
My issue
With my
.m3u8modified with correct paths and the PlexPlaylistImporter.py file edited, i successfully imported the playlists according to the script output but I can't see any of my playlists in Plex, even after rebooting the NAS :I know my use case is quite unusual but I hoped that you may have an idea about why the playlists don't show up at all in Plex even with a successfull output from your script.
Regards
Antony