#12 Music playlist support

open
None
5
2014-09-09
2009-12-07
Anonymous
No

Hi,

Thanks very much for creating MiniDLNA it is a great piece of work. MiniDLNA has recently taken over video and photo streaming duties (from Mediatomb) in my house :-)

Would you consider adding playlist support to MiniDLNA such that .m3u and .pls files are imported during a scan. In much the same way MiniDLNA creates genre folders from the tags in the audio files, it could also create new folders based on the content of the .m3u/.pls files? Mediatomb does have this feature and it is the only reason I've not fully migrated to MiniDLNA.

I have virtual machines running MiniDLNA latest CVS on 32-bit and 64-bit Linux. I will be more than happy to help with testing and feedback.

Regards, Martin.

Discussion


  • Anonymous
    2009-12-07

    Here is some additional information about .m3u and .pls playlists.

    http://www.assistanttools.com/articles/m3u_playlist_format.shtml
    http://www.assistanttools.com/articles/pls_playlist_format.shtml

    While there is no spec for how the media title should be formatted in an extended
    format .m3u or a .pls the accepted convention appears to be 'Artist - Track Title'
    for both play list formats, my testing with various tools bears this out. For example...

    .M3U Format

    #EXTINF:199,Pink Floyd - In The Flesh
    R:\Music\Pink Floyd\1979---The_Wall_CD1\1.In_The_Flesh.mp3

    .PLS Format

    File1=R:\Music\Pink Floyd\1979---The_Wall_CD1\1.In_The_Flesh.mp3
    Title1=Pink Floyd - In The Flesh
    Length1=199

     
  • Justin Maggard
    Justin Maggard
    2009-12-18

    Preliminary M3U playlist support draft

     
    Attachments
  • Justin Maggard
    Justin Maggard
    2009-12-18

    Can you please apply the attached patch and let me know how it works for you? It's pretty basic right now, but I'd like to know if I'm on the right track. There are still a number of things I can think of that would need to be handled:
    1) PLS support (only M3U is supported in this first patch)
    2) inotify handling of adding playlists
    3) inotify handling of adding new files that are referenced in existing playlists
    4) inotify handling of modifying playlists
    If you come across more items that need to be handled, please let me know of that also.

     
  • Stedy
    Stedy
    2009-12-19

    Hi
    I have done some testing whit your playlist patch, and it works ok for me. i generated the play list with Rythmbox.

    I don't know if you could put the playlist one level up? Now I have to go to music to chose playlist...
    My personal choice would be on the top level, but this is only my personal opinion.

    The only thing i regret on now is that i bought my television to early, should never bougt w4500 series but waited to video was suported by Sony.. wel wel. Guess i need a new Blu-ray player soon, so then i should be one whit DLNA video support.

     

  • Anonymous
    2009-12-23

    Hi,

    Happy Christmas!

    Thanks for the patch, it applied cleanly to CVS rev 164. I set MiniDLNA to to a full scan and have it auto create a new DB. All the music and playlists were scanned. However, when I went to select a Playlist on the PS3 there was a Playlist "menu" entry but no playlists with in it.

    I've done some testing and I think the problem is that the item in my m3u playlists are relative to the m3u file path. These m3u playlist are what I've been using with Banshee and Mediatomb. I've just copied a playlist and prefix the items with in it with the absolute path. I'll report back on my results later today.

    It is possible to MiniDLNA verify the existence of a play list item by the absolute file path location and also the relative location from the playlist itself?

    Regards, Martin.

     

  • Anonymous
    2009-12-23

    Hi,

    Just been looking throught the debug logs and found this.

    [2009/12/23 11:56:57] sql.c:38: error: SQL ERROR 1 [near "s_Eye": syntax error]
    INSERT into OBJECTS (OBJECT_ID, PARENT_ID, CLASS, DETAIL_ID, NAME, REF_ID) VALUES ('1$F$C$5411', '1$F$C', 'item.audioItem.musicTrack', 1830, 'Downloaded/Wolfmother/Wolfmother/08. Mind's_Eye.mp3', (select OBJECT_ID from OBJECTS where DETAIL_ID = 1830 and PARENT_ID glob '64$*'))

    Regards Martin.

     

  • Anonymous
    2009-12-23

    Hi,

    Hmm, scratch my earlier report that no playlists were visible on the PS3. After running up another clean install, with no DB, this time all the playlists are visible and playable on the PS3 :-)

    The only thing to change is that I added a new playlist which includes the absolute path to the playlist items. The original relative path playlists were unchanged and now show up and work?!

    Maybe I was impatient the first time, but all seem great now.

    Other than the outstanding features you've already mentioned the only other thing I've noticed is that items in the playlist are displayed alphabetically according to the top level directory they are located under, rather than alphabetically by artist or album.

    Anyway, very happy with the new feature. Thanks very much for the patch.

    Regards, Martin.

     
    Last edit: Anonymous 2014-08-23
  • Justin Maggard
    Justin Maggard
    2009-12-23

    M3U playlist support patch, second draft

     
    Attachments
  • Justin Maggard
    Justin Maggard
    2009-12-23

    • assigned_to: nobody --> jmaggard
     
  • Justin Maggard
    Justin Maggard
    2009-12-23

    I've attached a patch that should fix the issue with single quotes in the file name on playlist entries.

    Regarding the sort order, results should be ordered based on where the entry is in the playlist. Clients can ask for other sorting criteria, but, IIRC, the PS3 likes to get the results unsorted, and then sort them itself.

     

  • Anonymous
    2009-12-23

    Hi,

    Thanks for the updated patch, fast work :-)

    I can confirm that the new patch applies against current CVS and filenames including those with single quotes are now being added to playlists.

    I've checked the PS3 sorting, you are quite correct, and there is no issue with MiniDLNA.

    I'd just like to say thanks for the work on playlist support. Even though it is still in draft my wife and I have been playing our favourite playlists all day on the PS3 while finishing preparations for Christmas. It works well and been playing without interruption, something Mediatomb can't do since it will crash frequently and randomly on audio playback.

    As a result MiniDLNA is now serving up all our music, videos and photos. The Mediatomb server has been shutdown for the last time.

    Enjoy the holidays and I look forward to seeing how MiniDLNA will develop in 2010.

    Regards, Martin.

     

  • Anonymous
    2010-01-01

    Hi,

    Happy New Year!

    The patched MiniDLNA has performed brilliantly over the holiday season, streaming music from playlists for many hours a day.

    However, the order the items from the playlist are displayed on the PS3 is odd. The item order is not the order the items are listed in the .m3u file. By comparison the same playlists servered by Mediatomb do reflect the item order in the .m3u playlist.

    This is not an real issue for myself, since we always listen to playlists in shuffle mode but other users may want a playlist to play in the order they specified when creating the playlist.

    Regards, Martin.

     
  • Justin Maggard
    Justin Maggard
    2010-01-05

    Oh, maybe the PS3 is sorting by track number. The current code will use the track's actual track number, and not the entry number in the playlist. I'm attaching a small patch which should be applied after the latest playlist support patch that I'm hoping will take care of this. Would you be able to test this out? It should just replace the file's original track number with the playlist entry number.

     

  • Anonymous
    2010-01-06

    I've applied the second patch as instructued and rebuilt MiniDLNA. I also removed my existing SQlite DB and then used the new build to do a full scan.

    Sadly, from the PS3 playlist ordering is still jumlbled. But I can't really identify what order things are being listed in. Any suggestions as to how to can query MiniDLNA using some shell tool so I can capture the results and better determine what is going on?

    Regards, Martin.

     
  • Justin Maggard
    Justin Maggard
    2010-01-06

    If you run minidlna from the command line with the -d argument, it will output the XML that gets sent to the PS3. But again, the I believe the PS3 likes to sort the content itself; so we'd probably need to see what criteria it bases its sorting order on.

     
  • Justin Maggard
    Justin Maggard
    2010-01-08

    M3U playlist support patch, third draft

     
    Attachments
  • Justin Maggard
    Justin Maggard
    2010-01-08

    Okay, so I got in front of a PS3 and did some investigation. Apparently with the latest firmware, PS3 no longer sorts by anything other than object class (so folders go on top). Weird. It used to grab the whole list, and then sort it by name.

    Anyway, I've made changes to add a default sort criteria for playlists. I've also added all the inotify handling code as well. If you wouldn't mind, I'd love some feedback on the latest patch. If all goes well, minidlna_pl-3.diff will go upstream soon. Still need to add PLS support though.

     
  • Justin Maggard
    Justin Maggard
    2010-01-08

    M3U/PLS playlist support patch, fourth draft.

     
    Attachments

  • Anonymous
    2010-01-16

    Hi,

    Sorry for the delay, I re-installed my workstation last week and only just got to a point where I could test this. I see you've pushed these changes up to CVS so I built a fresh CVS with a clean SQLite DB.

    My .M3U playlist are working perfectly on my PS3 and are ordered as I would expect :-) From my point of view you can close this ticket.

    Thanks very much for taking the time to implement this feature. I'm sure it will prove popular with many more MiniDLNA users.

    Regards, Martin.

     
  • Could you also consider supporting the following (live stream):

    [playlist]
    NumberOfEntries=1
    File1=mms://live.onestreaming.com/latofm
    Title1=Lato Fm 103,3 - AG.NIKOLAOS

    or giving some hints on how it can be implemented?

    Regards,

     
  • Craig Chambers
    Craig Chambers
    2010-05-06

    Hi,

    Not sure I'm adding a lot here, but even Microsoft have deprecated their proprietary MMS protocol in favour of the standardised RTSP streaming protocol.

    Regards,
    Craig