防止加载不存在的封面
This commit is contained in:
		@@ -379,8 +379,10 @@ export default class MusicList {
 | 
			
		||||
                })
 | 
			
		||||
            }
 | 
			
		||||
        } else {
 | 
			
		||||
            this.标题.textContent = item.name                        // 替换标题
 | 
			
		||||
            this.封面.style.backgroundImage = `url(${item.picture})` // 替换封面图像
 | 
			
		||||
            this.标题.textContent = item.name
 | 
			
		||||
            if (item.picture) {
 | 
			
		||||
                this.封面.style.backgroundImage = `url(${item.picture})`
 | 
			
		||||
            }
 | 
			
		||||
            // 替换浏览器媒体信息(使系统通知栏显示歌曲信息)
 | 
			
		||||
            if ('mediaSession' in navigator) {
 | 
			
		||||
                navigator.mediaSession.metadata = new MediaMetadata({
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user