feat: updates

This commit is contained in:
qier222 2022-06-14 23:23:34 +08:00
parent 8f4c3d8e5b
commit f340a90117
No known key found for this signature in database
GPG key ID: 9C85007ED905F14D
34 changed files with 781 additions and 323 deletions

View file

@ -215,8 +215,12 @@ export class Player {
*/
private async _fetchAudioSource(trackID: TrackID) {
const response = await fetchAudioSourceWithReactQuery({ id: trackID })
let audio = response.data?.[0]?.url
if (audio && audio.includes('126.net')) {
audio = audio.replace('http://', 'https://')
}
return {
audio: response.data?.[0]?.url,
audio,
id: trackID,
}
}