From 94e15815005c302546fe7e11fd08078f86c4dc72 Mon Sep 17 00:00:00 2001 From: krolxon Date: Sun, 28 Apr 2024 20:05:25 +0530 Subject: remove RSong --- src/browser.rs | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'src/browser.rs') diff --git a/src/browser.rs b/src/browser.rs index 895eaa0..6af4f59 100755 --- a/src/browser.rs +++ b/src/browser.rs @@ -1,4 +1,4 @@ -use crate::{app::AppResult, connection::Connection, song::RSong}; +use crate::{app::AppResult, connection::Connection}; #[derive(Debug)] pub struct FileBrowser { @@ -7,8 +7,6 @@ pub struct FileBrowser { pub prev_selected: usize, pub path: String, pub prev_path: String, - - pub rsongs: Vec>, } impl FileBrowser { @@ -19,7 +17,6 @@ impl FileBrowser { prev_selected: 0, path: ".".to_string(), prev_path: ".".to_string(), - rsongs: Vec::new(), } } @@ -35,21 +32,6 @@ impl FileBrowser { Ok(()) } - // read all songs into a vec of RSongs - pub fn get_all_rsongs(&mut self, conn: &mut Connection) -> AppResult>> { - for (t, s) in self.filetree.iter() { - if t == "file" { - let s = conn.get_full_path(s)?; - let s = RSong::new(&mut conn.conn, s); - self.rsongs.push(Some(s)); - } else if t == "directory" { - self.rsongs.push(None) - } - } - - Ok(self.rsongs.clone()) - } - // Go to next item in filetree pub fn next(&mut self) { // if self.selected < self.filetree.len() - 1 { -- cgit v1.2.3