nhrx/mpdc — pull request #1 by madjar (2012-12-27 15:42:39+00:00)
Title: Replaced sets with ordered sets

Hey there,

I'm a great fan of mpdc, but there was one little thing that bothered me : when doing "mpdc-playlist add 'all|d60'", the songs were always sorted in the same order. Quite annoying, for a random playlist, isn't it.

Of course, it's because the sets are not ordered, and you have to give it an order before projecting it to the playlist. I solved that problem by using ordered sets, so that the order of the songs in an expression is preserved (when I ask for an album, I want the songs in order, but if I modify it with "|r5", I want them to be shuffled).

I must confess that, while I'm pretty sure the algorithmic complexity of the ordered set should be the same as the set's, I haven't benchmarked the change.

Anyway, thanks for their great tool !