mirror of
https://github.com/jeffvli/feishin.git
synced 2026-07-21 18:06:30 +02:00
bump taglib-wasm, support embedded lyrics property
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user