Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoRiether committed Feb 10, 2024
1 parent 37e7e70 commit b56dac4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tori/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async fn main() -> Result<()> {

make_sure_playlist_dir_exists();

let mut app = App::new()?;
let app = App::new()?;
app.run().await
}

Expand Down
12 changes: 5 additions & 7 deletions tori/src/state/browse_screen.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{app::filtered_list::FilteredList, config::Config, error::Result, m3u, input::Input};
use crate::{app::filtered_list::FilteredList, config::Config, error::Result, input::Input, m3u};
use std::{io, result::Result as StdResult};
use tui::widgets::TableState;

Expand Down Expand Up @@ -176,24 +176,22 @@ impl BrowseScreen {
/////////////////////////////
pub fn select_next(&mut self) -> Result<()> {
match self.focus {
Focus::Playlists => {
Focus::Playlists | Focus::PlaylistsFilter(_) => {
self.shown_playlists.select_next();
self.refresh_songs()?;
}
Focus::Songs => self.shown_songs.select_next(),
Focus::PlaylistsFilter(_) | Focus::SongsFilter(_) => {}
Focus::Songs | Focus::SongsFilter(_) => self.shown_songs.select_next(),
}
Ok(())
}

pub fn select_prev(&mut self) -> Result<()> {
match self.focus {
Focus::Playlists => {
Focus::Playlists | Focus::PlaylistsFilter(_) => {
self.shown_playlists.select_prev();
self.refresh_songs()?;
}
Focus::Songs => self.shown_songs.select_prev(),
Focus::PlaylistsFilter(_) | Focus::SongsFilter(_) => {}
Focus::Songs | Focus::SongsFilter(_) => self.shown_songs.select_prev(),
}
Ok(())
}
Expand Down
2 changes: 1 addition & 1 deletion tori/src/update/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,11 @@ fn handle_command(state: &mut State<'_>, tx: Tx, cmd: Command) -> Result<Option<
Add => todo!(),
Rename => todo!(),
Delete => todo!(),
PlayFromModal => todo!(),

SwapSongDown => todo!(),
SwapSongUp => todo!(),

PlayFromModal => todo!(),
OpenInEditor => todo!(),
}

Expand Down

0 comments on commit b56dac4

Please sign in to comment.