Skip to content

A self-hosted media server and file management system

feat: migrate to my fork of am-lyrics

aminnausinf99ac0746e7c
diff --git a/package-lock.json b/package-lock.json
index 463072a7..03589570 100755
--- a/package-lock.json
+++ b/package-lock.json
@@ -5,9 +5,9 @@
"packages": {
"": {
"dependencies": {
+ "@aminnausin/am-lyrics": "^1.0.1",
"@jellyfin/libass-wasm": "4.2.3",
"@tanstack/vue-query": "^5.77.2",
- "@uimaxbai/am-lyrics": "^1.6.0",
"@vueuse/components": "^13.0.0",
"@vueuse/core": "^13.0.0",
"@vueuse/integrations": "^13.0.0",
@@ -75,6 +75,28 @@
"vue-tsc": "^3.2.7"
}
},
+ "node_modules/@aminnausin/am-lyrics": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@aminnausin/am-lyrics/-/am-lyrics-1.0.1.tgz",
+ "integrity": "sha512-271Nly4c8SjL8BqVTsE/jR+7YJyHxa7YSDASM7/je8WVQqufgp8gmjdfSLlb3voW752A9fiaasTj1LdL/3DhaQ==",
+ "license": "MPL-2.0",
+ "dependencies": {
+ "@babel/runtime": "^7.27.6",
+ "lit": "^3.1.4"
+ },
+ "peerDependencies": {
+ "@lit/react": "^1.0.0",
+ "react": ">=17.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@lit/react": {
+ "optional": true
+ },
+ "react": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@aminnausin/cedar-ui": {
"version": "0.0.18",
"resolved": "https://registry.npmjs.org/@aminnausin/cedar-ui/-/cedar-ui-0.0.18.tgz",
@@ -2537,28 +2559,6 @@
"url": "https://opencollective.com/eslint"
}
},
- "node_modules/@uimaxbai/am-lyrics": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/@uimaxbai/am-lyrics/-/am-lyrics-1.6.0.tgz",
- "integrity": "sha512-5AI8Frakm0v0smxrfNanRzoX5I4AWOdNN2eS0FfdkcW7Oc/YgFbQqes1virHZc76LYX06qKvFQgFrtypQEGm/g==",
- "license": "MPL-2.0",
- "dependencies": {
- "@babel/runtime": "^7.27.6",
- "lit": "^3.1.4"
- },
- "peerDependencies": {
- "@lit/react": "^1.0.0",
- "react": ">=17.0.0"
- },
- "peerDependenciesMeta": {
- "@lit/react": {
- "optional": true
- },
- "react": {
- "optional": true
- }
- }
- },
"node_modules/@vitejs/plugin-vue": {
"version": "5.2.4",
"resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.2.4.tgz",
diff --git a/package.json b/package.json
index 74553f5a..13b126fb 100755
--- a/package.json
+++ b/package.json
@@ -92,7 +92,7 @@
"dependencies": {
"@jellyfin/libass-wasm": "4.2.3",
"@tanstack/vue-query": "^5.77.2",
- "@uimaxbai/am-lyrics": "^1.6.0",
+ "@aminnausin/am-lyrics": "^1.0.2",
"@vueuse/components": "^13.0.0",
"@vueuse/core": "^13.0.0",
"@vueuse/integrations": "^13.0.0",
diff --git a/resources/js/components/video/plugins/lyrics/AmLyrics.vue b/resources/js/components/video/plugins/lyrics/AmLyrics.vue
index 0a9cbfb5..49973c91 100644
--- a/resources/js/components/video/plugins/lyrics/AmLyrics.vue
+++ b/resources/js/components/video/plugins/lyrics/AmLyrics.vue
@@ -3,7 +3,7 @@ import { nextTick, onUnmounted, ref, useTemplateRef, watch } from 'vue';
import { FLAGS } from '@/config/featureFlags';
if (FLAGS.USE_AM_LYRICS) {
- await import('@uimaxbai/am-lyrics/am-lyrics.js');
+ await import('@aminnausin/am-lyrics/am-lyrics.js');
}
const props = defineProps<{
@@ -11,6 +11,7 @@ const props = defineProps<{
title?: string;
artist?: string;
album?: string;
+ lyrics?: string;
duration: number;
enabled?: boolean;
}>();
@@ -97,6 +98,8 @@ onUnmounted(() => {
:song-duration="duration * 1000"
:query="`${artist} ${album} ${title}`"
:duration="duration * 1000"
+ :allowed-sources="'bini'"
+ :lrc="lyrics"
highlight-color="#fff"
font-family="var(--font-commit-mono)"
autoscroll
diff --git a/resources/js/components/video/plugins/lyrics/VideoLyrics.vue b/resources/js/components/video/plugins/lyrics/VideoLyrics.vue
index de891908..d5f5f668 100644
--- a/resources/js/components/video/plugins/lyrics/VideoLyrics.vue
+++ b/resources/js/components/video/plugins/lyrics/VideoLyrics.vue
@@ -279,6 +279,7 @@ defineExpose({ scrollToCurrent });
:title="stateVideo.title"
:artist="stateVideo.artist"
:album="stateVideo.album"
+ :lyrics="stateVideo.metadata?.lyrics"
:duration="timeDuration"
/>
<template #fallback><p class="animate-pulse px-4 pt-10 text-xl">...</p> </template>