feat(Synced-Lyrics): Also search for lyrics with the original title language (#3206)

* Add tags array for song info

* Implement original title and original artist search for LRCBLib

* comment cleanup

* Check if microformat.tags is an array
This commit is contained in:
Eric
2025-04-16 16:12:04 +02:00
committed by GitHub
parent 5853523074
commit 53193cda98
3 changed files with 58 additions and 3 deletions

View File

@ -42,6 +42,7 @@ export interface SongInfo {
videoId: string;
playlistId?: string;
mediaType: MediaType;
tags?: string[];
}
// Grab the native image using the src
@ -83,6 +84,7 @@ const handleData = async (
videoId: '',
playlistId: '',
mediaType: MediaType.Audio,
tags: [],
} satisfies SongInfo;
const microformat = data.microformat?.microformatDataRenderer;
@ -96,6 +98,7 @@ const handleData = async (
songInfo.alternativeTitle = microformat.linkAlternates.find(
(link) => link.title,
)?.title;
songInfo.tags = Array.isArray(microformat.tags) ? microformat.tags : [];
}
const { videoDetails } = data;