diff --git a/src-tauri/src/library.rs b/src-tauri/src/library.rs index cd76dac..9521529 100644 --- a/src-tauri/src/library.rs +++ b/src-tauri/src/library.rs @@ -10,6 +10,8 @@ pub fn initialize_library(conn: &Connection) -> Result<()> { return Ok(()) } + db::clean_library(conn)?; + let directories = db::get_directories(conn)?; let tracks = fs_track::load_tracks_from_directories(&directories)?; let result = add_tracks(tracks, conn); diff --git a/src/components/ChooseDirectory.vue b/src/components/ChooseDirectory.vue index f366ca9..25dbef3 100644 --- a/src/components/ChooseDirectory.vue +++ b/src/components/ChooseDirectory.vue @@ -7,14 +7,14 @@
{{ directory }}
-
@@ -79,4 +79,11 @@ const chooseDirectory = async () => { directories.value.push(selected) } } + +const removeDirectory = (index) => { + if (index < 0) { + return + } + directories.value.splice(index) +} diff --git a/src/components/library/Config.vue b/src/components/library/Config.vue index 7bf0e77..f8aa1ef 100644 --- a/src/components/library/Config.vue +++ b/src/components/library/Config.vue @@ -18,14 +18,14 @@
-
- +
Refresh my library for new changes...