feat: shuffle the whole library from the Random section
Shuffle all, the first tile of the Random section, plays random tracks from getRandomSongs and fetches another batch when fewer than five are left. Played tracks past the last fifty are dropped, so the queue stays small. Tracks queued meanwhile play after the playing track and after anything queued before them, ahead of the random ones. Playing anything else ends it, and it carries on after a restart.
This commit is contained in:
@@ -289,10 +289,6 @@ impl Client {
|
||||
|
||||
/// Up to `size` random songs from the whole library. Servers cap `size`
|
||||
/// at 500.
|
||||
#[cfg_attr(
|
||||
not(test),
|
||||
expect(dead_code, reason = "library shuffle in 7ff72a1 is its first caller")
|
||||
)]
|
||||
pub async fn random_songs(&self, size: u32) -> Result<Vec<Song>> {
|
||||
#[derive(Deserialize)]
|
||||
struct R {
|
||||
|
||||
Reference in New Issue
Block a user