Music Playlist

No import supported (yet). I am currently thinking about a good functional specification for that.

So far thinking about:

1. Generic m3u file format (only contain (relative) path + filename).

    => Find match track in the plex database only possible in case plex folders are equal to folder strcuture in the m3u file

2. Extended m3u file format

    => Find matching track could be done by path+filename or searching for title from the #EXTINF: line.

         What to do in case of multiple matches?

Playlists are stored as xml files in the Plugin-support data folder for the channel  (<$PlexMediaServer>\Plug-in Support\Data\com.plexapp.plugins.playlist\DataItems)

where <$PlexMediaServer depends> on the OS:

Windows: C:\Users\\AppData\Local\Plex Media Server

Ubuntu:  /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server

Thanks. I would be happy with a relative path m3u list for an import.  

I see the xml file containing the playlist. But there's no way to add them manually since you need the metadata id.  

Hi Chrisjan,

Thank you for this plug in, Brilliant.

I have been using PMS with my Samsung TV for about 5 months now and absolutely love it and this just about puts the icing on the cake in combination with the playlist editor.

Thanks again

Chrisjan,

This plugin is brilliant, with the Manager it works perfect. If it was possible to use Sync with plugins my day would be complete

Thanks.

Does this post help at all w/ sync on plugins:

http://forums.plexapp.com/index.php/topic/86237-adding-sync-support-to-channel/

Thanks. I would be happy with a relative path m3u list for an import.  

I see the xml file containing the playlist. But there's no way to add them manually since you need the metadata id.  

Import function for m3u files is now available in the standalone MusicPlaylistManager

Import function for m3u files is now available in the standalone MusicPlaylistManager

Does this only work if the server is windows and running on the same box as the Manager tool? My server is linux, and I tried to run it on a windows laptop, but I had no luck. 

Does this only work if the server is windows and running on the same box as the Manager tool? My server is linux, and I tried to run it on a windows laptop, but I had no luck. 

I am running the Plex server on Ubuntu myself, so it is actually only tested on a similar setup as yours.

Can you give some detail about what is not working for you in the import?

= Can you select a m3u file?

= Does it show all the tracks from the file in the grid?

= Do you get any matches when executing "Match on filename"?

= Do you get any matches when executing "Match on title"?

= Does it fail on executing "Create playlist"?

The "Create playlist" button should become enabled when  at least one track in the import list has a match AND a title for the new playlist is specified in the "New playlist" section.

 -

I am running the Plex server on Ubuntu myself, so it is actually only tested on a similar setup as yours.

Can you give some detail about what is not working for you in the import?

= Can you select a m3u file?

= Does it show all the tracks from the file in the grid?

= Do you get any matches when executing "Match on filename"?

= Do you get any matches when executing "Match on title"?

= Does it fail on executing "Create playlist"?

The "Create playlist" button should become enabled when  at least one track in the import list has a match AND a title for the new playlist is specified in the "New playlist" section.

 -

I can select the m3u file. 

It shows all the tracks in the grid.

I run the program from: C:\downloads\plex\MusicPlaylistManager-master\MusicPlaylistManager-master\PlexMusicPlaylists\bin\Debug

The m3u file is located in: C:\downloads\plex\favs.m3u

The contents of the m3u file is: 

....

/opt/mp3i/imagine_dragons/Imagine_Dragons_-_Night_Visions_(2012)/01. Imagine Dragons - Radioactive.mp3
....

When I do the import, it doesn't match any, and the first line in the tool is:

			&nbsp;
		
			&nbsp;
		
			False
		
			0
		
			&nbsp;
		
			&nbsp;
		
			/opt/mp3/i/imagine_dragons/Imagine_Dragons_-_Night_Visions_(2012)/01. Imagine Dragons - Radioactive.mp3
		
			&nbsp;
		
			&nbsp;
		
			&nbsp;
		
			C:/opt/mp3/i/imagine_dragons/Imagine_Dragons_-_Night_Visions_(2012)/01. Imagine Dragons - Radioactive.mp3

Why is it putting c:/ in front for the full filename?

What should the contents of the m3u file be? Full path or relative? And relative to what?

I am running the Plex server on Ubuntu myself, so it is actually only tested on a similar setup as yours.

Can you give some detail about what is not working for you in the import?

= Can you select a m3u file?

= Does it show all the tracks from the file in the grid?

= Do you get any matches when executing "Match on filename"?

= Do you get any matches when executing "Match on title"?

= Does it fail on executing "Create playlist"?

The "Create playlist" button should become enabled when  at least one track in the import list has a match AND a title for the new playlist is specified in the "New playlist" section.

 -

I can select the m3u file. 

It shows all the tracks in the grid.

I run the program from: C:\downloads\plex\MusicPlaylistManager-master\MusicPlaylistManager-master\PlexMusicPlaylists\bin\Debug

The m3u file is located in: C:\downloads\plex\favs.m3u

The contents of the m3u file is: 

....

/opt/mp3i/imagine_dragons/Imagine_Dragons_-_Night_Visions_(2012)/01. Imagine Dragons - Radioactive.mp3
....

When I do the import, it doesn't match any, and the first line in the tool is:

    False 0     /opt/mp3/i/imagine_dragons/Imagine_Dragons_-_Night_Visions_(2012)/01. Imagine Dragons - Radioactive.mp3       C:/opt/mp3/i/imagine_dragons/Imagine_Dragons_-_Night_Visions_(2012)/01. Imagine Dragons - Radioactive.mp3

Why is it putting c:/ in front for the full filename?

What should the contents of the m3u file be? Full path or relative? And relative to what?

Should be fixed now.I had only tested the import with m3u-files generated on a windows system.

Entries in M3u files can contain filenames with full path information and / or relative path information.

All relative paths (or lines with only a filename) are treated relative to the location where the m3u file is in.

See the Reade.md file of the GIT- project for a short explanation of the import function

Should be fixed now.I had only tested the import with m3u-files generated on a windows system.

Entries in M3u files can contain filenames with full path information and / or relative path information.

All relative paths (or lines with only a filename) are treated relative to the location where the m3u file is in.

See the Reade.md file of the GIT- project for a short explanation of the import function

Ok. That makes sense. I tried it again, but now it hangs on the import and just says 'plesmediaserver: loading folders from section Music'. 

Is there a way to turn on debug so we can see what it's doing?

I checked the plex log and I see this filling the log: 

 Nov 24, 2013 10:32:03 [0x7f84fbfff700] WARN - SLOW QUERY: It took 350.000000 ms to retrieve 13 items.

Nov 24, 2013 10:32:03 [0x7f855cff9700] WARN - SLOW QUERY: It took 380.000000 ms to retrieve 0 items.
Nov 24, 2013 10:32:03 [0x7f84fbfff700] WARN - SLOW QUERY: It took 350.000000 ms to retrieve 11 items.
Nov 24, 2013 10:32:04 [0x7f855cff9700] WARN - SLOW QUERY: It took 340.000000 ms to retrieve 11 items.
Nov 24, 2013 10:32:04 [0x7f84fbfff700] WARN - SLOW QUERY: It took 380.000000 ms to retrieve 0 items.
Nov 24, 2013 10:32:05 [0x7f855cff9700] WARN - SLOW QUERY: It took 360.000000 ms to retrieve 11 items.
Nov 24, 2013 10:32:05 [0x7f855cff9700] WARN - SLOW QUERY: It took 350.000000 ms to retrieve 12 items.
 
Are you scanning the entire library? Mine is quite large. It took a while but it completed. However, still no matches:
 
    False 0     /opt/mp3/i/imagine_dragons/Imagine_Dragons_-_Night_Visions_(2012)/01. Imagine Dragons - Radioactive.mp3 Music i/imagine_dragons/Imagine_Dragons_-_Night_Visions_(2012)   /opt/mp3/i/imagine_dragons/Imagine_Dragons_-_Night_Visions_(2012)/01. Imagine Dragons - Radioactive.mp3
 
It appears to have found the folder though. Am I putting the correct values in the m3u file? I put in the full path. And in the folder mappings I have Plex Location = /opt/mp3 and the Mapped Location = /opt/mp3. Are these correct?

Ok. That makes sense. I tried it again, but now it hangs on the import and just says 'plesmediaserver: loading folders from section Music'. 

Is there a way to turn on debug so we can see what it's doing?

I checked the plex log and I see this filling the log: 

 Nov 24, 2013 10:32:03 [0x7f84fbfff700] WARN - SLOW QUERY: It took 350.000000 ms to retrieve 13 items.

Nov 24, 2013 10:32:03 [0x7f855cff9700] WARN - SLOW QUERY: It took 380.000000 ms to retrieve 0 items.
Nov 24, 2013 10:32:03 [0x7f84fbfff700] WARN - SLOW QUERY: It took 350.000000 ms to retrieve 11 items.
Nov 24, 2013 10:32:04 [0x7f855cff9700] WARN - SLOW QUERY: It took 340.000000 ms to retrieve 11 items.
Nov 24, 2013 10:32:04 [0x7f84fbfff700] WARN - SLOW QUERY: It took 380.000000 ms to retrieve 0 items.
Nov 24, 2013 10:32:05 [0x7f855cff9700] WARN - SLOW QUERY: It took 360.000000 ms to retrieve 11 items.
Nov 24, 2013 10:32:05 [0x7f855cff9700] WARN - SLOW QUERY: It took 350.000000 ms to retrieve 12 items.
 
Are you scanning the entire library? Mine is quite large. It took a while but it completed. However, still no matches:
 
    False 0     /opt/mp3/i/imagine_dragons/Imagine_Dragons_-_Night_Visions_(2012)/01. Imagine Dragons - Radioactive.mp3 Music i/imagine_dragons/Imagine_Dragons_-_Night_Visions_(2012)   /opt/mp3/i/imagine_dragons/Imagine_Dragons_-_Night_Visions_(2012)/01. Imagine Dragons - Radioactive.mp3
 
It appears to have found the folder though. Am I putting the correct values in the m3u file? I put in the full path. And in the folder mappings I have Plex Location = /opt/mp3 and the Mapped Location = /opt/mp3. Are these correct?

Hi oggie,

"Are you scanning the entire library?"

You are right about that. For import I am actually scanning the entire library recursively  'by Folder'. This is because I need to know the entire folder structure in order to match relative path from the import file to a folder in plex (and I don't know of another way to get that information).

I have made some changes to prevent loading the entire folder structure from PMS on every import run. Once loaded from PMS, the folderlist will now be cached to local disk (in folder C:\Users\\AppData\Local\PlexMusicPlaylists). The (XML) cache file is named "Server__Section_.cache".

The folder structure for a Plex section can be reloaded from the  "Setup folder mappings" form. In the new form, select the section in the list and click "Show folders in section" . This will show all folders for the Plex section. On this form there is also an option to reload the folders.

"It appears to have found the folder though. Am I putting the correct values in the m3u file? I put in the full path. And in the folder mappings I have Plex Location = /opt/mp3 and the Mapped Location = /opt/mp3. Are these correct?"

The function "Match on filename" will try to find the filename in the Plex Folder for every line in the import file. This is done by finding the exact file name (Full filename field) in the plex folder. I have also added the url for the plex folder.  You can easily check the contents of this plex folder this way:

= Open a browser and go to:  PLEX-IP:PORT (e.g.: 192.168.1.10:32400/library/sections/8/folder?parent=625)

There should be an entry in the response with the exact filename as shown in the grid.

Hi Chrisjan - thank you for your work on this plug-in - it's something I've been waiting for for a long time. However... I can't get playlists imported.

Running Plex latest version on Windows 8.1.

I took my entire iTunes library and copied it to my D: drive, so D:\iTunes, and imported it into Plex using the Plex Music Scanner. The music files are playable from my clients. So far so good.

I exported my playlists from iTunes to m3u files and edited the files so that the pathnames match the location of the music files.

I have a test playlist in D:\ containing absolute paths to the music files. This playlist works under Windows Media Player, so I know the file locations are correct. Playlist Manager connects to the Plex server and successfully scanned all the music folders - they all show up in the Setup Folder Mappings dialog.

However... for the life of me I can't get the Playlist Manager to match any songs on filename.

I also can't get it to match on title either (but I know the reason why...) The m3u playlist exported by iTunes lists the song title first, and then the artist. Playlist Manager imports them in the reverse order. I edited one entry as a test and it matched correctly based on title.

Now back to matching on filename. Here's my m3u file:

#EXTM3U
#EXTINF:275,Out in the Street (live) - Bruce Springsteen
D:\iTunes\iTunes Media\Music\Bruce Springsteen\Unknown Album\Out in the Street (live).mp3
#EXTINF:295,Brothers Under The Bridge - Bruce Springsteen
D:\iTunes\iTunes Media\Music\Bruce Springsteen\Tracks (Disc 4)\14 Brothers Under The Bridge.mp3
#EXTINF:227,Bruce Springsteen - Bobby Jean
D:\iTunes\iTunes Media\Music\Bruce Springsteen\Born In The U.S.A\08 Bobby Jean.mp3
 

I click Import.

I select the import file. It is located in the root of D:\. The files listed in the m3u are shown in the grid. (Artist and Title are reversed.) Here's the first entry:

Icon: red circle with slash

Matched: (unchecked)

Title: matches 0

Artist: Out in the Street (live)

Title: Bruce Springsteen

FileName: D:\iTunes\iTunes Media\Music\Bruce Springsteen\Unknown Album\Out in the Street (live).mp3

Main section: Music

Folder (Plex Media Server): n/a

Key: (blank)

Full filename (Plex): D:\iTunes\iTunes Media\Music\Bruce Springsteen\Unknown Album\Out in the Street (live).mp3

Click Match on filename - result, no matches

Click Match on title - result, only the last song matches (TAN)

The one part of all this I am unsure of is the Setup folder mappings. I just can't quite understand what the purpose of that is.

I have the Directory separator set to backslash (\).

I have one entry:

Main section: Music

Plex Location: D:\iTunes\

Mapped Location:  I've tried all kinds of things here and then reloaded the m3u with no luck. Examples: D:\iTunes\, D:/iTunes, 127.0.0.1:32400/library/sections/5/folder?parent=837  (yeah, I'm desperate, trying to figure this out).

Can you help? I feel like I am just one minor step short of getting this to work.

Thanks Chrisjan

Hi, and thank You for a great plugin... I manage to get Your previous version of the playlistmanager to work and import m3u playlists..

However I can't get the new version to work. Se attached screenshots..

Old version: 

![post-109519-0-30650400-1386688940.png|625x500](upload://udCtzVLW8NAAqqVT62j7Ttkqig4.png)

New version:

![post-109519-0-37332100-1386688953.png|625x500](upload://9spgisr6W2adyyQk38gLTIdeX5m.png)

I notice that there is a differens in the "Folder (Plex Media Server)" section, URL/PATH...

If I enter the Title then it finds the match...

Janson

Hi, and thank You for a great plugin... I manage to get Your previous version of the playlistmanager to work and import m3u playlists..

However I can't get the new version to work. Se attached screenshots..

Old version: 

attachicon.gifMplaylist_1.png

New version:

attachicon.gifMplaylist_2.png

I notice that there is a differens in the "Folder (Plex Media Server)" section, URL/PATH...

If I enter the Title then it finds the match...

Janson

I put out a version with some logging of the 'match on filename' process. It is written to a 'C:\Users\\AppData\Local\PlexMusicPlaylists\Logs' folder.

I also fixed an issue that caused the "match on filename" process to fail when an Artist was missing.

I put out a version with some logging of the 'match on filename' process. It is written to a 'C:\Users\\AppData\Local\PlexMusicPlaylists\Logs' folder.

I also fixed an issue that caused the "match on filename" process to fail when an Artist was missing.

Thank You Crisjan, now it works.... I only have some trouble with.. some character sets.. (Swedish),   but that's another story and Plex in generally, at least for the music section.

Janson

OK I managed to finally get this installed and recognized in ubuntu PMS. Showed up w/o booting even.

This if functionality that is sorely missing natively in plex so this is really promising. Listening to a song at a time is brutal..and no artist is worth listening to nonstop.

Is there more documentation ? from Plex/Web I dont really see intuitively how the playlist creation works at all? the github link doesnt really clarify?

Is the windows playlist creation tool mandatory?

Thanks for this sorely needed plugin/channel just trying to give it a solid go.

Thanks for this brilliant plug-in!  I'm using this on my Samsung TV and it's great to have the ability to have custom playlists.

I'm still playing around but if I may put in a request for an option to turn off the screen when the playlist starts playing? (If that's even possible)

Possibly have the screen visible for the first 5-10 secs of a track, and then the screen is blanked until the next track?

Thank you!

I am watching this thread with great interest. Hoping that one day there will be a document that spells out exactly what one needs to do to use this brilliant add-on feature - a step by step guide from zero to having a fully managed playlist used on all Plex Players.

I am watching this thread with great interest. Hoping that one day there will be a document that spells out exactly what one needs to do to use this brilliant add-on feature - a step by step guide from zero to having a fully managed playlist used on all Plex Players.

The app channel interface via the Droid app is different but still unable to make a playlist with even one track.

Thanks for this brilliant plug-in!  I'm using this on my Samsung TV and it's great to have the ability to have custom playlists.

I'm still playing around but if I may put in a request for an option to turn off the screen when the playlist starts playing? (If that's even possible)

Possibly have the screen visible for the first 5-10 secs of a track, and then the screen is blanked until the next track?

Thank you!

i think screensaver support on all aspects of samsung has been achieved in the upcoming release

still waiting to get approved by samsung...

this should fix this problem i think

Has anyone noticed that the cover art does not change when the song changes anymore? It did when i first started using the plugin but now it always stays on the album art for the first song played.