henkelis / sonospy

Sonospy is a UPnP control point and Windows Media proxy for the Sonos multi-room audio system.
GNU General Public License v3.0
113 stars 16 forks source link

FR: Allow Indices of Random Items #90

Open bartolomesoriano opened 6 years ago

bartolomesoriano commented 6 years ago

I would like to be able to pull x random albums.

@henkelis, you have mentioned in the past:

"There is currently no support for random selections. It's fairly trivial to add that to the select, but the controllers cache selections, so I'd have to find a bullet proof way to invalidate the content directory for each index that has random selections in it. If I invalidate each time for every index, you'd lose the caching and browsing would likely be slower. I thought about invalidating it overnight, but that won't solve repeated calls to the same random index within a day (I'm guessing if someone doesn't like the random, selection, they'd try again). I'll have a think about it."

I thought some more about the random albums, and the way I've seen other services handle that is that once you select Random Albums, the list does not change, until you select a different music service, select something there, and then go back to the original service and select Random Albums again. Maybe this approach could work here as well.

Just having the issue here so that it does not get lost in the group e-mails.