Skip to content

Commit

Permalink
feat(provider): Add source in AudioData
Browse files Browse the repository at this point in the history
  • Loading branch information
pan93412 committed Oct 5, 2023
1 parent 56cfe91 commit c92852f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/provider/match.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const isHttpResponseOk = (code) => code >= 200 && code <= 299;
const headerReferer = new Map([['bilivideo.com', 'https://www.bilibili.com/']]);

/**
* @typedef {{ size: number, br: number | null, url: string | null, md5: string | null }} AudioData
* @typedef {{ size: number, br: number | null, url: string | null, md5: string | null, source: string }} AudioData
*/

/**
Expand All @@ -49,7 +49,10 @@ async function getAudioFromSource(source, info) {
);

logger.debug({ source, info }, 'The audio matched!');
return song;
return {
...song,
source,
};
}

async function match(id, source, data) {
Expand Down

0 comments on commit c92852f

Please sign in to comment.