From 51114d65c844f6dd801f043283b5ccd55c404a46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20T=C3=A4kker?= Date: Mon, 5 Oct 2026 02:22:06 +0200 Subject: [PATCH] Handle unsynced lyrics marked synced --- app/components/Player/Fullscreen/LyricsDisplay.vue | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/components/Player/Fullscreen/LyricsDisplay.vue b/app/components/Player/Fullscreen/LyricsDisplay.vue index adaf724..65d5aef 100644 --- a/app/components/Player/Fullscreen/LyricsDisplay.vue +++ b/app/components/Player/Fullscreen/LyricsDisplay.vue @@ -12,13 +12,14 @@ const debugView = useCookie("DEBUG_VIEW") const debugViewEnabled = computed(() => String(debugView.value ?? "") === "1") const parsedLyrics = computed(() => { - if (!song.value?.lyrics?.synced) return + if (!song.value?.lyrics?.synced) return [] - if (song.value.lyrics.synced) return parseLyrics(song.value.lyrics.text) + return parseLyrics(song.value.lyrics.text) }) +const hasParsedLyrics = computed(() => parsedLyrics.value.length > 0) const findLyricIndex = (time: number) => { - if (!parsedLyrics.value) return -1 + if (!hasParsedLyrics.value) return -1 const index = parsedLyrics.value.findIndex( (lyric, i) => @@ -34,7 +35,7 @@ const activeIndex = computed(() => { return findLyricIndex(secondsPlayed.value) }) const scrollActiveIndex = computed(() => { - if (!parsedLyrics.value) return -1 + if (!hasParsedLyrics.value) return -1 const time = secondsPlayed.value + animationDuration @@ -164,7 +165,7 @@ const finalTransform = computed(() => { />