connect: handle dnd of current track ()

This commit is contained in:
Felix Prillwitz 2025-01-23 19:14:48 +01:00 committed by GitHub
parent 5f7cfdc76c
commit 98e9703edb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -249,6 +249,14 @@ impl<'ct> ConnectState {
self.queue_count += 1;
});
// when you drag 'n drop the current track in the queue view into the "Next from: ..."
// section, it is only send as an empty item with just the provider and metadata, so we have
// to provide set the uri from the current track manually
tracks
.iter_mut()
.filter(|t| t.uri.is_empty())
.for_each(|t| t.uri = self.current_track(|ct| ct.uri.clone()));
self.player_mut().next_tracks = tracks;
}