fix: cloudpan music playing error (#812)

master
Vidocq 3 years ago committed by GitHub
parent daadad7bf3
commit 89d346b2ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -52,7 +52,10 @@ async function deleteExcessCache() {
export function cacheTrackSource(trackInfo, url, bitRate, from = 'netease') {
const name = trackInfo.name;
const artist = trackInfo.ar[0]?.name || trackInfo.artists[0]?.name;
const artist =
(trackInfo.ar && trackInfo.ar[0]?.name) ||
(trackInfo.artists && trackInfo.artists[0]?.name) ||
'Unknown';
let cover = trackInfo.al.picUrl;
if (cover.slice(0, 5) !== 'https') {
cover = 'https' + cover.slice(4);

Loading…
Cancel
Save