Skip to content

A self-hosted media server and file management system

feat: make am-lyrics setting persist

aminnausin8bcc180f9c9d
diff --git a/resources/js/components/video/plugins/lyrics/VideoLyrics.vue b/resources/js/components/video/plugins/lyrics/VideoLyrics.vue
index 322e4b8d..7591ba9f 100644
--- a/resources/js/components/video/plugins/lyrics/VideoLyrics.vue
+++ b/resources/js/components/video/plugins/lyrics/VideoLyrics.vue
@@ -262,11 +262,18 @@ defineExpose({ scrollToCurrent });
</script>
<template>
<Suspense v-if="FLAGS.USE_AM_LYRICS">
- <AmLyrics :enabled="useAmLyrics" :player="player" :title="stateVideo.title" :artist="stateVideo.artist" :album="stateVideo.album" :duration="timeDuration" />
+ <AmLyrics
+ :enabled="useAmLyrics && isShowingLyrics"
+ :player="player"
+ :title="stateVideo.title"
+ :artist="stateVideo.artist"
+ :album="stateVideo.album"
+ :duration="timeDuration"
+ />
<template #fallback> ... </template>
</Suspense>
<section
- class="fade-mask font-klee-one-mono scrollbar-hide flex h-full w-full flex-col overflow-y-scroll text-center text-sm sm:text-lg 2xl:text-xl"
+ class="fade-mask font-lyrics scrollbar-hide flex h-full w-full flex-col overflow-y-scroll text-center text-sm sm:text-lg 2xl:text-xl"
ref="lyrics-container"
v-show="lyrics.length > 0 && !useAmLyrics"
@wheel="handleUserScroll"
diff --git a/resources/js/stores/AppStore.ts b/resources/js/stores/AppStore.ts
index f1e2f0bb..6abc868e 100644
--- a/resources/js/stores/AppStore.ts
+++ b/resources/js/stores/AppStore.ts
@@ -184,6 +184,8 @@ export const useAppStore = defineStore('App', () => {
isPlaylist.init();
isAmbientMode.init();
+ useAmLyrics.init();
+
preferredAudioLanguage.init();
};