Skip to content

Commit

Permalink
Fix stack overflow, enable production sourcemap
Browse files Browse the repository at this point in the history
  • Loading branch information
tranxuanthang committed Jun 29, 2024
1 parent 0dfb16a commit b1abf8a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/library/LibraryHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const downloadAllLyrics = async () => {
if (config.skip_not_needed_tracks) {
downloadTrackIds = await invoke('get_no_lyrics_track_ids')
} else {
downloadTrackIds = await invoke('get_track_ids', { enableSearch: false })
downloadTrackIds = await invoke('get_track_ids')
}
addToQueue(downloadTrackIds)
} catch (error) {
Expand Down
5 changes: 4 additions & 1 deletion src/composables/downloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ const downloadProgress = computed(() => {
const addToQueue = (trackIds) => {
isDownloading.value = true

downloadQueue.value.push(...trackIds)
for (let i = 0; i < trackIds.length; i++) {
downloadQueue.value.push(trackIds[i])
}

totalCount.value += trackIds.length

console.log(`Added ${totalCount.value} tracks to download queue`)
Expand Down
2 changes: 1 addition & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default defineConfig({
// don't minify for debug builds
minify: !process.env.TAURI_DEBUG ? "esbuild" : false,
// produce sourcemaps for debug builds
sourcemap: !!process.env.TAURI_DEBUG,
sourcemap: true,
},
// resolve: {
// alias: {
Expand Down

0 comments on commit b1abf8a

Please sign in to comment.