mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 21:58:03 +00:00
fix: cloudpan music playing error (#812)
This commit is contained in:
parent
daadad7bf3
commit
89d346b2ff
1 changed files with 4 additions and 1 deletions
|
|
@ -52,7 +52,10 @@ async function deleteExcessCache() {
|
||||||
|
|
||||||
export function cacheTrackSource(trackInfo, url, bitRate, from = 'netease') {
|
export function cacheTrackSource(trackInfo, url, bitRate, from = 'netease') {
|
||||||
const name = trackInfo.name;
|
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;
|
let cover = trackInfo.al.picUrl;
|
||||||
if (cover.slice(0, 5) !== 'https') {
|
if (cover.slice(0, 5) !== 'https') {
|
||||||
cover = 'https' + cover.slice(4);
|
cover = 'https' + cover.slice(4);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue