feat: add save current command
This commit is contained in:
committed by
Henrik Friedrichsen
parent
2c61a965f1
commit
f74661a15d
@@ -12,7 +12,7 @@ use crate::ext_traits::CursiveExt;
|
||||
use crate::library::Library;
|
||||
use crate::queue::{Queue, RepeatSetting};
|
||||
use crate::spotify::{Spotify, VOLUME_PERCENT};
|
||||
use crate::traits::{IntoBoxedViewExt, ViewExt};
|
||||
use crate::traits::{IntoBoxedViewExt, ListItem, ViewExt};
|
||||
use crate::ui::contextmenu::{
|
||||
AddToPlaylistMenu, ContextMenu, SelectArtistActionMenu, SelectArtistMenu,
|
||||
};
|
||||
@@ -272,6 +272,12 @@ impl CommandManager {
|
||||
self.spotify.shutdown();
|
||||
Ok(None)
|
||||
}
|
||||
Command::SaveCurrent => {
|
||||
if let Some(mut track) = self.queue.get_current() {
|
||||
track.save(&self.library);
|
||||
}
|
||||
Ok(None)
|
||||
}
|
||||
|
||||
Command::Queue
|
||||
| Command::PlayNext
|
||||
|
||||
Reference in New Issue
Block a user