diff options
| author | krolxon <krolyxon@tutanota.com> | 2024-04-28 20:05:25 +0530 |
|---|---|---|
| committer | krolxon <krolyxon@tutanota.com> | 2024-04-28 20:05:25 +0530 |
| commit | 94e15815005c302546fe7e11fd08078f86c4dc72 (patch) | |
| tree | 83c1094ae8c4ccca82aa9ce38cab4057985c7827 /src/browser.rs | |
| parent | fd371e896096b03bc5efa7dc59963cbba0c334e7 (diff) | |
remove RSong
Diffstat (limited to 'src/browser.rs')
| -rwxr-xr-x | src/browser.rs | 20 |
1 files changed, 1 insertions, 19 deletions
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<Option<RSong>>, } 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<Vec<Option<RSong>>> { - 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 { |
