diff --git a/package.json b/package.json index 0fcb605bb..d890fc502 100644 --- a/package.json +++ b/package.json @@ -140,7 +140,7 @@ "react-window-v2": "npm:react-window@^2.2.7", "semver": "^7.8.2", "string-to-color": "^2.2.2", - "taglib-wasm": "^1.3.0", + "taglib-wasm": "^1.5.0", "wavesurfer.js": "^7.12.7", "ws": "^8.21.0", "zod": "^3.25.76", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 575364e25..71a5fc60d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -217,8 +217,8 @@ importers: specifier: ^2.2.2 version: 2.2.2 taglib-wasm: - specifier: ^1.3.0 - version: 1.3.0(typescript@5.9.3) + specifier: ^1.5.0 + version: 1.5.0(typescript@5.9.3) wavesurfer.js: specifier: ^7.12.7 version: 7.12.8 @@ -5198,8 +5198,8 @@ packages: resolution: {integrity: sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==} engines: {node: '>=20'} - taglib-wasm@1.3.0: - resolution: {integrity: sha512-CBC4biY3fYPIEEviH4zMG0NsXUs2SZuW4ElffGn4UbYNE4xRmdmwdK/K4O+BRqjY1QARfdULaw8Hw8uFDvd/Gw==} + taglib-wasm@1.5.0: + resolution: {integrity: sha512-YBveOndsq58ZUbC7DgaP7N5V0i+8aOaf4LwuclKxbea3sNeg3ewF4NxaUu9Lq3pBV7qpVHyn32a1iZBjeu/d/w==} engines: {node: '>=22.6.0'} peerDependencies: typescript: '>=4.5.0' @@ -11060,7 +11060,7 @@ snapshots: tagged-tag@1.0.0: {} - taglib-wasm@1.3.0(typescript@5.9.3): + taglib-wasm@1.5.0(typescript@5.9.3): dependencies: '@msgpack/msgpack': 3.1.3 optionalDependencies: diff --git a/src/main/features/core/tag-editor/taglib-service.ts b/src/main/features/core/tag-editor/taglib-service.ts index 46b78410c..7dc47c2e2 100644 --- a/src/main/features/core/tag-editor/taglib-service.ts +++ b/src/main/features/core/tag-editor/taglib-service.ts @@ -120,7 +120,14 @@ export async function readFilesMetadataBatch( try { const file = await taglib.open(filePath); 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 frontCover = pictures.find((p) => p.type === 'FrontCover') ?? pictures[0]; const hasCoverArt = frontCover !== undefined;