diff --git a/app/components/deck.vue b/app/components/deck.vue index 5c309cc..51d18de 100644 --- a/app/components/deck.vue +++ b/app/components/deck.vue @@ -1,14 +1,12 @@ @@ -22,6 +20,7 @@ const props = defineProps<{ }>() const dataStore = useDataStore() const deck = ref() +const tracks = props.compilation.duration ? dataStore.getTracksByCompilationId(props.compilation.id) : dataStore.getPlaylistTracksByCompilationId(props.compilation.id) function setDisplay(displayMode) { deck.value.classList.remove('pile', 'plateau', 'holdem') diff --git a/server/api/playlists.ts b/server/api/playlists.ts index 853af45..6dedf7b 100644 --- a/server/api/playlists.ts +++ b/server/api/playlists.ts @@ -43,6 +43,7 @@ export default eventHandler(async (event) => { const date = new Date(year, month - 1, day, hour) const card = getCardFromDate(date) const url = `${urlPrefix}/${encodeURIComponent(file)}` + const coverId = `${urlPrefix}/cover/${encodeURIComponent(file)}` return { id: Number(`${year}${index + 1}`), @@ -51,7 +52,7 @@ export default eventHandler(async (event) => { title: title.trim(), artist: artist.trim(), url, - coverId: '', + coverId, card } })