fix(queue): correct remove-from-queue index and add history context menu
- Add remove_upcoming_track command that correctly maps upcoming index to actual queue index (handles shuffle mode properly) - Update frontend to use remove_upcoming_track instead of remove_from_queue - Add working context menu for history tracks (Add to Playlist, Track Info) - Remove unused .track-menu CSS class
This commit is contained in:
1 parent
3a8ef43227
commit
8dcad203c7
5 files changed
+91
-28
No files matched your search
@@ -95,6 +95,14 @@ pub fn remove_from_queue(index: usize, state: State<'_, AppState>) -> Result<Opt
|
||||
Ok(state.queue.remove_track(index))
|
||||
}
|
||||
|
||||
/// Remove a track from the upcoming queue by its position in the upcoming list
|
||||
/// (0 = first upcoming track, handles shuffle mode correctly)
|
||||
#[tauri::command]
|
||||
pub fn remove_upcoming_track(upcoming_index: usize, state: State<'_, AppState>) -> Result<Option<QueueTrack>, String> {
|
||||
log::info!("Command: remove_upcoming_track - upcoming_index {}", upcoming_index);
|
||||
Ok(state.queue.remove_upcoming_track(upcoming_index))
|
||||
}
|
||||
|
||||
/// Move a track from one position to another in the queue
|
||||
#[tauri::command]
|
||||
pub fn move_queue_track(from_index: usize, to_index: usize, state: State<'_, AppState>) -> Result<bool, String> {
|
||||
|
||||
Reference in new issue
Block a user