bump taglib-wasm, support embedded lyrics property

This commit is contained in:
jeffvli
2026-07-16 18:52:39 -07:00
parent 107727c65d
commit 4b15bcb7d7
3 changed files with 14 additions and 7 deletions
+1 -1
View File
@@ -140,7 +140,7 @@
"react-window-v2": "npm:react-window@^2.2.7", "react-window-v2": "npm:react-window@^2.2.7",
"semver": "^7.8.2", "semver": "^7.8.2",
"string-to-color": "^2.2.2", "string-to-color": "^2.2.2",
"taglib-wasm": "^1.3.0", "taglib-wasm": "^1.5.0",
"wavesurfer.js": "^7.12.7", "wavesurfer.js": "^7.12.7",
"ws": "^8.21.0", "ws": "^8.21.0",
"zod": "^3.25.76", "zod": "^3.25.76",
+5 -5
View File
@@ -217,8 +217,8 @@ importers:
specifier: ^2.2.2 specifier: ^2.2.2
version: 2.2.2 version: 2.2.2
taglib-wasm: taglib-wasm:
specifier: ^1.3.0 specifier: ^1.5.0
version: 1.3.0(typescript@5.9.3) version: 1.5.0(typescript@5.9.3)
wavesurfer.js: wavesurfer.js:
specifier: ^7.12.7 specifier: ^7.12.7
version: 7.12.8 version: 7.12.8
@@ -5198,8 +5198,8 @@ packages:
resolution: {integrity: sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==} resolution: {integrity: sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==}
engines: {node: '>=20'} engines: {node: '>=20'}
taglib-wasm@1.3.0: taglib-wasm@1.5.0:
resolution: {integrity: sha512-CBC4biY3fYPIEEviH4zMG0NsXUs2SZuW4ElffGn4UbYNE4xRmdmwdK/K4O+BRqjY1QARfdULaw8Hw8uFDvd/Gw==} resolution: {integrity: sha512-YBveOndsq58ZUbC7DgaP7N5V0i+8aOaf4LwuclKxbea3sNeg3ewF4NxaUu9Lq3pBV7qpVHyn32a1iZBjeu/d/w==}
engines: {node: '>=22.6.0'} engines: {node: '>=22.6.0'}
peerDependencies: peerDependencies:
typescript: '>=4.5.0' typescript: '>=4.5.0'
@@ -11060,7 +11060,7 @@ snapshots:
tagged-tag@1.0.0: {} tagged-tag@1.0.0: {}
taglib-wasm@1.3.0(typescript@5.9.3): taglib-wasm@1.5.0(typescript@5.9.3):
dependencies: dependencies:
'@msgpack/msgpack': 3.1.3 '@msgpack/msgpack': 3.1.3
optionalDependencies: optionalDependencies:
@@ -120,7 +120,14 @@ export async function readFilesMetadataBatch(
try { try {
const file = await taglib.open(filePath); const file = await taglib.open(filePath);
try { try {
const flat = flattenProperties(file.properties()); const rawProperties = file.properties();
const embeddedLyrics = file.getLyrics();
if (embeddedLyrics.length > 0) {
rawProperties.lyrics = [
embeddedLyrics.map(({ text }) => text).join('\n\n'),
];
}
const flat = flattenProperties(rawProperties);
const pictures = file.getPictures(); const pictures = file.getPictures();
const frontCover = pictures.find((p) => p.type === 'FrontCover') ?? pictures[0]; const frontCover = pictures.find((p) => p.type === 'FrontCover') ?? pictures[0];
const hasCoverArt = frontCover !== undefined; const hasCoverArt = frontCover !== undefined;