Implement vim-style navigation and visual mode
All checks were successful
Build and Release / build-and-release (push) Successful in 51s
All checks were successful
Build and Release / build-and-release (push) Successful in 51s
- Add vim-style h key: closes folders and jumps to parent - Implement stop() method in player for proper playback stopping - Add space key to restart playback when stopped - Add playlist color coding: green (playing), blue (paused), yellow (stopped) - Fix n/p keys to preserve player state when switching tracks - Implement vim-style visual mode with v key for multi-file selection - Visual mode exits automatically on play/add actions - Remove unused play_previous method - Bump version to 0.1.7
This commit is contained in:
@@ -187,6 +187,13 @@ impl Player {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn stop(&mut self) -> Result<()> {
|
||||
self.send_command("stop", &[])?;
|
||||
self.is_idle = true;
|
||||
self.position = 0.0;
|
||||
self.duration = 0.0;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn set_volume(&mut self, volume: i64) -> Result<()> {
|
||||
self.send_command("set_property", &[json!("volume"), json!(volume)])?;
|
||||
|
||||
Reference in New Issue
Block a user