fix playlist

This commit is contained in:
Julian Freeman
2025-12-08 08:52:49 -04:00
parent dda4e482c1
commit 091cf65dac
9 changed files with 160 additions and 53 deletions

View File

@@ -18,6 +18,21 @@ export const useAnalysisStore = defineStore('analysis', () => {
output_path: ''
})
function toggleEntry(id: string) {
if (metadata.value && metadata.value.entries) {
const entry = metadata.value.entries.find((e: any) => e.id === id)
if (entry) {
entry.selected = !entry.selected
}
}
}
function setAllEntries(selected: boolean) {
if (metadata.value && metadata.value.entries) {
metadata.value.entries.forEach((e: any) => e.selected = selected)
}
}
function reset() {
url.value = ''
loading.value = false
@@ -27,5 +42,5 @@ export const useAnalysisStore = defineStore('analysis', () => {
scanMix.value = false
}
return { url, loading, error, metadata, options, isMix, scanMix, reset }
return { url, loading, error, metadata, options, isMix, scanMix, toggleEntry, setAllEntries, reset }
})