mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-14 11:51:47 +00:00
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:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user