Skip to content

Commit

Permalink
fix: bilishazam
Browse files Browse the repository at this point in the history
  • Loading branch information
lovegaoshi committed Dec 3, 2024
1 parent d6cbea0 commit 0511992
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/utils/mediafetch/bilishazam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { setSongBiliShazamed } from '@objects/Song';
import bfetch from '@utils/BiliFetch';
import { biliTagApiLimiter } from './throttle';
import { logger } from '../Logger';
import { extractSongName } from '../re';

/**
* API that gets the tag of a video. sometimes bilibili identifies the BGM used.
Expand All @@ -27,7 +28,8 @@ const fetchVideoTagPromiseRaw = async ({ bvid, cid }: Ids) => {
const json = await req.json();
try {
if (json.data[0].tag_type === 'bgm') {
return json.data[0].tag_name;
// its like this now?? 发现《Kiss Me More》
return extractSongName(json.data[0].tag_name);
}
return null;
} catch (e) {
Expand Down

0 comments on commit 0511992

Please sign in to comment.