From 3c54745303115ec6aff202621d143693cec27b85 Mon Sep 17 00:00:00 2001
From: MrDulfin <Dulfinaminator@gmail.com>
Date: Sat, 13 Jan 2024 00:20:23 -0500
Subject: [PATCH 1/3] updated cargo.toml

---
 Cargo.toml | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml
index bb0746c..cf407e4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,21 +1,21 @@
 [package]
-name = "dango-core"
-version = "0.1.1"
+name = "dmp-core"
+version = "0.0.0"
 edition = "2021"
 license = "AGPL-3.0-only"
-description = "A music backend that manages storage, querying, and playback of remote and local songs."
-homepage = "https://dangoware.com/dango-music-player"
-documentation = "https://docs.rs/dango-core"
+description = "Backend crate for the Dango Music Player "
+homepage = ""
+documentation = ""
 readme = "README.md"
-repository = "https://github.com/Dangoware/dango-music-player"
-keywords = ["audio", "music"]
-categories = ["multimedia::audio"]
+repository = "https://github.com/Dangoware/dmp-core"
+keywords = []
+categories = []
 
 [dependencies]
-file-format = { version = "0.22.0", features = ["reader-asf", "reader-ebml", "reader-mp4", "reader-rm", "reader-txt", "reader-xml", "serde"] }
-lofty = "0.17.1"
+file-format = { version = "0.23.0", features = ["reader-asf", "reader-ebml", "reader-mp4", "reader-rm", "reader-txt", "reader-xml", "serde"] }
+lofty = "0.18.0"
 serde = { version = "1.0.191", features = ["derive"] }
-toml = "0.7.5"
+toml = "0.8.8"
 walkdir = "2.4.0"
 chrono = { version = "0.4.31", features = ["serde"] }
 bincode = { version = "2.0.0-rc.3", features = ["serde"] }

From 2d0464a9935652aa5621b6bff7f2d5220a490af9 Mon Sep 17 00:00:00 2001
From: MrDulfin <Dulfinaminator@gmail.com>
Date: Sat, 13 Jan 2024 00:57:26 -0500
Subject: [PATCH 2/3] removed broken imports

---
 src/lib.rs                    | 5 -----
 src/music_storage/library.rs  | 1 -
 src/music_storage/playlist.rs | 4 +---
 3 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/src/lib.rs b/src/lib.rs
index c20df16..aca688d 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -20,9 +20,4 @@ pub mod music_storage {
     }
 }
 
-pub mod music_controller {
-    pub mod config;
-    pub mod controller;
-}
-
 pub mod music_player;
diff --git a/src/music_storage/library.rs b/src/music_storage/library.rs
index 7c5d466..5394652 100644
--- a/src/music_storage/library.rs
+++ b/src/music_storage/library.rs
@@ -1,7 +1,6 @@
 use super::music_collection::MusicCollection;
 // Crate things
 use super::utils::{find_images, normalize, read_library, write_library};
-use crate::music_controller::config::Config;
 
 // Various std things
 use std::collections::BTreeMap;
diff --git a/src/music_storage/playlist.rs b/src/music_storage/playlist.rs
index 6b3dc96..099d015 100644
--- a/src/music_storage/playlist.rs
+++ b/src/music_storage/playlist.rs
@@ -6,7 +6,6 @@ use super::{
     library::{self, AlbumArt, Song, Tag},
     music_collection::MusicCollection,
 };
-use crate::music_controller::config::Config;
 use crate::music_storage::db_reader::xml::reader::XmlLibrary;
 
 use std::io::Read;
@@ -86,7 +85,6 @@ impl<'a> Playlist<'a> {
                             .get_key_value(&Tag::Title)
                             .unwrap()
                             .1
-                            .to_string()
                             .into(),
                     ),
                     ..Default::default()
@@ -149,7 +147,7 @@ fn list_to_m3u8() {
     ));
     let mut a = Playlist::new();
     let c = lib.to_songs();
-    let mut b = c.iter().map({ |song| song }).collect::<Vec<&Song>>();
+    let mut b = c.iter().map( |song| song ).collect::<Vec<&Song>>();
     a.tracks.append(&mut b);
     a.to_m3u8()
 }

From bc75b92237189e9409a50b9aa4270ec662fa4170 Mon Sep 17 00:00:00 2001
From: MrDulfin <Dulfinaminator@gmail.com>
Date: Wed, 17 Jan 2024 05:53:18 -0500
Subject: [PATCH 3/3] messing around with config

---
 Cargo.toml                                |  1 +
 src/config/config.rs                      | 16 +++++
 src/config/other_settings.rs              | 82 +++++++++++++++++++++++
 src/lib.rs                                | 20 ++----
 src/music_storage/db_reader/mod.rs        | 13 ++++
 src/music_storage/db_reader/xml/reader.rs |  4 +-
 src/music_storage/playlist.rs             |  1 +
 7 files changed, 119 insertions(+), 18 deletions(-)
 create mode 100644 src/config/config.rs
 create mode 100644 src/config/other_settings.rs
 create mode 100644 src/music_storage/db_reader/mod.rs

diff --git a/Cargo.toml b/Cargo.toml
index cf407e4..5a2fa1e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -34,3 +34,4 @@ leb128 = "0.2.5"
 urlencoding = "2.1.3"
 m3u8-rs = "5.0.5"
 thiserror = "1.0.56"
+font = "0.27.0"
diff --git a/src/config/config.rs b/src/config/config.rs
new file mode 100644
index 0000000..ee86c15
--- /dev/null
+++ b/src/config/config.rs
@@ -0,0 +1,16 @@
+use std::{path::PathBuf, marker::PhantomData};
+
+#[derive(Debug, Default)]
+pub struct Config {
+    db_path: Option<PathBuf>,
+}
+
+impl Config {
+    pub fn new_main() -> Self {
+        Config::default()
+    }
+    //TODO: Add new function for test tube
+    pub fn load(&self) {
+
+    }
+}
\ No newline at end of file
diff --git a/src/config/other_settings.rs b/src/config/other_settings.rs
new file mode 100644
index 0000000..c1940a4
--- /dev/null
+++ b/src/config/other_settings.rs
@@ -0,0 +1,82 @@
+use std::{marker::PhantomData, fs::File, path::PathBuf};
+
+use font::Font;
+
+pub trait Setting {}
+
+pub struct DropDown {
+    name: String,
+    //value: ???
+}
+impl Setting for DropDown {}
+
+#[derive(Debug, Default)]
+pub struct Slider {
+    name: String,
+    value: i32,
+}
+impl Setting for Slider {}
+
+#[derive(Debug, Default)]
+pub struct CheckBox {
+    name: String,
+    value: bool,
+}
+impl Setting for CheckBox {}
+
+enum TextBoxSize {
+    Small,
+    Large,
+}
+#[derive(Debug, Default)]
+pub struct TextBox<Size = TextBoxSize> {
+    name: String,
+    text: String,
+    size: PhantomData<Size>
+}
+impl Setting for TextBox {}
+
+#[derive(Debug, Default)]
+pub struct SingleSelect {
+    name: String,
+    value: bool,
+}
+impl Setting for SingleSelect {}
+
+#[derive(Debug, Default)]
+pub struct MultiSelect {
+    name: String,
+    value: bool,
+}
+impl Setting for MultiSelect {}
+
+#[derive(Debug, Default)]
+pub struct ConfigCounter {
+    name: String,
+    value: i32,
+}
+impl Setting for ConfigCounter {}
+
+#[derive(Debug, Default)]
+pub struct ConfigFont {
+    name: String,
+    value: Font,
+}
+impl Setting for ConfigFont {}
+
+#[derive(Debug, Default)]
+pub struct ConfigFile {
+    name: String,
+    value: PathBuf,
+}
+impl Setting for ConfigFile {}
+
+#[derive(Debug, Default)]
+pub struct List<T: Setting> {
+    items: Vec<T>
+}
+
+pub struct Form {
+
+}
+
diff --git a/src/lib.rs b/src/lib.rs
index aca688d..6d8be4c 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -3,21 +3,11 @@ pub mod music_storage {
     pub mod music_collection;
     pub mod playlist;
     mod utils;
-    pub mod db_reader {
-        pub mod foobar {
-            pub mod reader;
-            pub mod utils;
-        }
-        pub mod musicbee {
-            pub mod reader;
-            pub mod utils;
-        }
-        pub mod xml {
-            pub mod reader;
-        }
-        pub mod common;
-        pub mod extern_library;
-    }
+    pub mod db_reader;
 }
 
 pub mod music_player;
+pub mod config {
+    pub mod config;
+    pub mod other_settings;
+}
diff --git a/src/music_storage/db_reader/mod.rs b/src/music_storage/db_reader/mod.rs
new file mode 100644
index 0000000..6569a82
--- /dev/null
+++ b/src/music_storage/db_reader/mod.rs
@@ -0,0 +1,13 @@
+pub mod foobar {
+    pub mod reader;
+    pub mod utils;
+}
+pub mod musicbee {
+    pub mod reader;
+    pub mod utils;
+}
+pub mod xml {
+    pub mod reader;
+}
+pub mod common;
+pub mod extern_library;
\ No newline at end of file
diff --git a/src/music_storage/db_reader/xml/reader.rs b/src/music_storage/db_reader/xml/reader.rs
index 50beeac..1652551 100644
--- a/src/music_storage/db_reader/xml/reader.rs
+++ b/src/music_storage/db_reader/xml/reader.rs
@@ -92,7 +92,6 @@ impl ExternalLibrary for XmlLibrary {
                     }
 
                     let text = e.unescape().unwrap().to_string();
-
                     if text == count2.to_string() && !key_selected {
                         continue;
                     }
@@ -118,8 +117,7 @@ impl ExternalLibrary for XmlLibrary {
             buf.clear();
         }
         let elasped = now.elapsed();
-        println!("\n\nXMLReader\n=========================================\n\nDone!\n{} songs grabbed in {:#?}\nIDs Skipped: {}", count3, elasped, count4);
-        // dbg!(folder);
+        println!("\n\nXMLReader grabbed {} songs in {:#?} seconds\nIDs Skipped: {}", count3, elasped.as_secs(), count4);
         let mut lib = XmlLibrary::new();
         lib.tracks.append(converted_songs.as_mut());
         lib
diff --git a/src/music_storage/playlist.rs b/src/music_storage/playlist.rs
index 099d015..4ad49dd 100644
--- a/src/music_storage/playlist.rs
+++ b/src/music_storage/playlist.rs
@@ -102,6 +102,7 @@ impl<'a> Playlist<'a> {
             segments: seg.clone(),
             ..Default::default()
         };
+        //TODO: change this to put in a real file path
         let mut file = std::fs::OpenOptions::new()
             .read(true)
             .create(true)