aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/browser.rs8
-rwxr-xr-xsrc/connection.rs15
-rwxr-xr-xsrc/ui.rs1
3 files changed, 12 insertions, 12 deletions
diff --git a/src/browser.rs b/src/browser.rs
index 9add421..895eaa0 100755
--- a/src/browser.rs
+++ b/src/browser.rs
@@ -1,8 +1,4 @@
-use crate::{
- app::{App, AppResult},
- connection::Connection,
- song::RSong,
-};
+use crate::{app::AppResult, connection::Connection, song::RSong};
#[derive(Debug)]
pub struct FileBrowser {
@@ -76,8 +72,6 @@ impl FileBrowser {
}
}
-
-
pub fn handle_go_back(&mut self, conn: &mut Connection) -> AppResult<()> {
if self.prev_path != "." {
let r = self.path.rfind("/").unwrap();
diff --git a/src/connection.rs b/src/connection.rs
index 2add4e2..a929385 100755
--- a/src/connection.rs
+++ b/src/connection.rs
@@ -28,7 +28,7 @@ impl Connection {
let mut conn = Client::connect(addrs).unwrap();
let empty_song = Song {
- file: "No Song in the Queue".to_string(),
+ file: "No Song playing or in Queue".to_string(),
artist: None,
title: None,
duration: None,
@@ -52,7 +52,10 @@ impl Connection {
let repeat = status.repeat;
let random = status.random;
- let current_song = conn.currentsong().unwrap_or_else(|_| Some(empty_song.clone())).unwrap_or_else(|| empty_song);
+ let current_song = conn
+ .currentsong()
+ .unwrap_or_else(|_| Some(empty_song.clone()))
+ .unwrap_or_else(|| empty_song);
Ok(Self {
conn,
songs_filenames,
@@ -93,8 +96,12 @@ impl Connection {
/// Update status
pub fn update_status(&mut self) {
let status = self.conn.status().unwrap();
- let empty_song = self.get_song_with_only_filename("No Song in the Queue");
- let current_song = self.conn.currentsong().unwrap_or_else(|_| Some(empty_song.clone())).unwrap_or_else(|| empty_song);
+ let empty_song = self.get_song_with_only_filename("No Song playing or in Queue");
+ let current_song = self
+ .conn
+ .currentsong()
+ .unwrap_or_else(|_| Some(empty_song.clone()))
+ .unwrap_or_else(|| empty_song);
// Playback State
match status.state {
diff --git a/src/ui.rs b/src/ui.rs
index c25d913..edbf429 100755
--- a/src/ui.rs
+++ b/src/ui.rs
@@ -1,5 +1,4 @@
use crate::app::{App, SelectedTab};
-use clap::builder::styling::RgbColor;
use ratatui::{
prelude::*,
widgets::{block::Title, *},