FireFly Media Server › Firefly Media Server Forums › Firefly Media Server › General Discussion › Smart Playlists – Shuffling and Limit
- This topic has 7 replies, 5 voices, and was last updated 18 years, 6 months ago by rpedde.
-
AuthorPosts
-
06/06/2006 at 10:15 PM #332kitGuest
I’ve been looking at creating a solution for the problem of being able to rapidly play a shuffled playlist either from a large subset of my media, or from all media items.
Last night I got myself familar with the code base and modified db-generic.c to order the playlist items results in random order. sqlite supports “order by RANDOM()” in its queries which makes this simple. I confirmed that DAAP requests then got randomized results. If I were to combine this with a limit to the query, the SoundBridge would be able to receive a short playlist (300-500 should be more than enough for most use cases). This would allow people to play a shuffle all, without the long wait and stability issues that people like myself have with very large music libraries.
I looked over the way the RSP code handles playlists, and the protocol seems to have a concept of limiting the result set, but it doesn’t seem that the SoundBridge leverages this (yet). Are there already plans in the works to address this issue, or should I pursue a approach along these lines?
What I was thinking about doing was extending the smart playlist language in order to allow people to specifiy a max results and a shuffle option. Based on the current code base this would have to be done once in the DAAP code and once in the RSP code.
Thoughts?
06/06/2006 at 11:37 PM #4944rpeddeParticipant@kit wrote:
I looked over the way the RSP code handles playlists, and the protocol seems to have a concept of limiting the result set, but it doesn’t seem that the SoundBridge leverages this (yet). Are there already plans in the works to address this issue, or should I pursue a approach along these lines?
True, that’s for paging through the result set not really for making a playlist of a limited number of items.
Random playlists and custom order by playlists are on the map, but post 1.0. I’m trying to stabilize for a 1.0 release now.
What I was thinking about doing was extending the smart playlist language in order to allow people to specifiy a max results and a shuffle option. Based on the current code base this would have to be done once in the DAAP code and once in the RSP code.
That’s the best first step. I was going to make them optional directives just before the start of the criteria. Something like:
order album,ascending;track,ascending
limit 20
artist includes “morrissey”or:
order random
limit 100
rating > 60Something like that.
08/06/2006 at 3:11 PM #4945mattbParticipantJust thought I’d chime in here too. Smart playlists are a fantastic feature, and one that sets Firefly from most others.
I love the start you have on them, but I agree the randomization and limiting the number of records returned would be great. Even if we could just do a passthrough sql query without much of an interface that would be great.
Keep up the good work!
14/06/2006 at 10:47 AM #4946fizzeParticipantwow, sounds promising.
but, the smart playlists too are always based upon songs /tracks, right ?
What about a feature like “random album” ?
basically, instead of a
SELECT ID FROM SONGS WHERE blabla
wouldnt it be nice to be able to do aSELECT ID FROM SONGS WHERE blabla GROUP BY ALBUM;
of course, that would be 2 query modes, and the SB would have to honor the different grouping. Maybe it can group the stuff itself, I donno…?
15/06/2006 at 8:09 PM #4947grommetParticipant@fizze wrote:
The SB would have to honor the different grouping. Maybe it can group the stuff itself, I donno…?
Regarding “Playlists”, SoundBridge does zero sorting (by design). It plays in the order the server exposes it. Well, unless you press the shuffle track button… 8)
If the tracks in the generated playlist were in “Random Album” grouping, it would work fine.
15/06/2006 at 10:06 PM #4948rpeddeParticipant@grommet wrote:
@fizze wrote:
The SB would have to honor the different grouping. Maybe it can group the stuff itself, I donno…?
Regarding “Playlists”, SoundBridge does zero sorting (by design). It plays in the order the server exposes it. Well, unless you press the shuffle track button… 8)
If the tracks in the generated playlist were in “Random Album” grouping, it would work fine.
But that’s what everyone is always unhappy about, that the server returns stuff in unsorted order! (static playlists, particularly)
Lol.
16/06/2006 at 8:07 AM #4949fizzeParticipantyeah, the SB is pretty dumb, but thats ok 😉
well, if the SB does no sorting then its mt-daapd that does sorting in playlists etc., which is not so clever actually.
I found that those are sorted by artist ?
wheres the code that “sorts” or scans the playlists ?17/06/2006 at 5:06 AM #4950rpeddeParticipant@fizze wrote:
yeah, the SB is pretty dumb, but thats ok 😉
well, if the SB does no sorting then its mt-daapd that does sorting in playlists etc., which is not so clever actually.
I found that those are sorted by artist ?
wheres the code that “sorts” or scans the playlists ?Isn’t any. I’m about to order the playlists again, but last time it was too heavy for the NSLU2, so I’ll make it a config option.
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.