fix shuffle not shuffling away first element

and fix dragging selected song not dragging all selected elements but rather only those that pass current filter/search, which was not intended.
This commit is contained in:
Mark
2023-12-31 14:16:18 +01:00
parent 7f33d2daf8
commit 8a9ee5c9cf
10 changed files with 121 additions and 80 deletions

View File

@@ -287,7 +287,7 @@ pub async fn main(db: Arc<Mutex<Database>>, sender: mpsc::Sender<Command>, addr:
post(move |Path(song_id)| async move {
_ = s6.send(Command::QueueAdd(
vec![],
QueueContent::Song(song_id).into(),
vec![QueueContent::Song(song_id).into()],
));
}),
)
@@ -297,7 +297,7 @@ pub async fn main(db: Arc<Mutex<Database>>, sender: mpsc::Sender<Command>, addr:
if let Some(album) = db1.lock().unwrap().albums().get(&album_id) {
_ = s7.send(Command::QueueAdd(
vec![],
QueueContent::Folder(
vec![QueueContent::Folder(
0,
album
.songs
@@ -306,7 +306,7 @@ pub async fn main(db: Arc<Mutex<Database>>, sender: mpsc::Sender<Command>, addr:
.collect(),
album.name.clone(),
)
.into(),
.into()],
));
}
}),