Skip to content

Commit

Permalink
Skip song folders on error
Browse files Browse the repository at this point in the history
  • Loading branch information
ZerNico committed Jun 24, 2023
1 parent d385b9f commit bd9b1b6
Show file tree
Hide file tree
Showing 4 changed files with 3,572 additions and 3,209 deletions.
20 changes: 15 additions & 5 deletions apps/tauri/src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions apps/tauri/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ cpal = "0.14.0"
ringbuf = "0.3.3"
desync = "0.8.2"
tokio = { version = "1", features = [ "rt", "rt-multi-thread", "sync", "fs", "io-util" ] }
tauri-plugin-window-state = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "dev" }
tauri-plugin-persisted-scope = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "dev" }
tauri-plugin-window-state = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
tauri-plugin-persisted-scope = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
percent-encoding = "2.2.0"
url = "2.3.1"
rand = "0.8.5"
Expand Down
12 changes: 8 additions & 4 deletions apps/tauri/src/pages/loading.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ const songsStore = useSongsStore()
const load = async () => {
songsStore.clearSongs()
for (const path of songsStore.paths) {
const entries = await readDir(path, { recursive: true })
const root: FileEntry = { path, children: entries }
try {
const entries = await readDir(path, { recursive: true })
const root: FileEntry = { path, children: entries }
const songs = await parseTree(root)
songsStore.addSongs(songs)
const songs = await parseTree(root)
songsStore.addSongs(songs)
} catch (e) {
console.error(e)
}
}
songsStore.needsUpdate = false
Expand Down
Loading

0 comments on commit bd9b1b6

Please sign in to comment.