fix playlist
This commit is contained in:
@@ -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 }
|
||||
})
|
||||
Reference in New Issue
Block a user