Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle drag and drop of current track #1449

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions connect/src/state/tracks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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: ..."
photovoltex marked this conversation as resolved.
Show resolved Hide resolved
// 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;
}

Expand Down
Loading