mirror of
https://github.com/antebudimir/feishin.git
synced 2025-12-31 18:13:31 +00:00
Fix id return type on netease fetcher
This commit is contained in:
parent
14aeee888f
commit
493e13ebc0
2 changed files with 4 additions and 8 deletions
|
|
@ -96,12 +96,12 @@ export async function getSearchResults(
|
|||
|
||||
if (!rawSongsResult) return null;
|
||||
|
||||
const songResults: InternetProviderLyricSearchResponse[] = rawSongsResult.map((song: any) => {
|
||||
const artist = song.artists ? song.artists.map((artist: any) => artist.name).join(', ') : '';
|
||||
const songResults: InternetProviderLyricSearchResponse[] = rawSongsResult.map((song) => {
|
||||
const artist = song.artists ? song.artists.map((artist) => artist.name).join(', ') : '';
|
||||
|
||||
return {
|
||||
artist,
|
||||
id: song.id,
|
||||
id: String(song.id),
|
||||
name: song.name,
|
||||
source: LyricSource.NETEASE,
|
||||
};
|
||||
|
|
@ -115,8 +115,6 @@ async function getMatchedLyrics(
|
|||
): Promise<Omit<InternetProviderLyricResponse, 'lyrics'> | null> {
|
||||
const results = await getSearchResults(params);
|
||||
|
||||
console.log('results', results);
|
||||
|
||||
const firstMatch = results?.[0];
|
||||
|
||||
if (!firstMatch || (firstMatch?.score && firstMatch.score > 0.5)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue