Prior99 / mopidy-subidy

Mopidy extension for playing music from Subsonic servers.
BSD 3-Clause "New" or "Revised" License
30 stars 12 forks source link

Feature request: Random playlist #17

Open michaelcadilhac opened 7 years ago

michaelcadilhac commented 7 years ago

I often use Subsonic to randomly go through my library. It used to be that the former mopidy-subsonic plugin offered a "random" playlist, would it be possible to have the same here?

Cheers; M.

Prior99 commented 7 years ago

There is an api route for getting random songs on subsonic's side and the corresponding utility in py-sonic also exists.

I guess in SubidyPlaylistsProvider.as_list we could call that utility and add a new playlist to the returned list of playlists.

However, I am unsure. Doesn't mopidy cache (at least for some time) the stuff we give it? We would have to refresh that playlist everytime the user clicks on it. Would that be a problem?

michaelcadilhac commented 7 years ago

At first glance, I cannot find any caching in mopidy or in iris. Do you see a particular place? One possible trick, if they cache the contents of the playlists, is to always give a fresh playlist with a new reserved ID.