Skip to content

Commit

Permalink
修复封面链接事件在封面链接相同时仍然触发的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
lyswhut committed Apr 11, 2024
1 parent 0522114 commit 75750ad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/renderer/core/player/action.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { isEmpty, setPause, setPlay, setResource, setStop } from '@renderer/plugins/player'
import { isPlay, playedList, playInfo, playMusicInfo, tempPlayList } from '@renderer/store/player/state'
import { isPlay, playedList, playInfo, playMusicInfo, tempPlayList, musicInfo as _musicInfo } from '@renderer/store/player/state'
import {
getList,
clearPlayedList,
Expand Down Expand Up @@ -148,7 +148,7 @@ const handleRestorePlay = async(restorePlayInfo: LX.Player.SavedPlayInfo) => {


void getPicPath({ musicInfo, listId: playMusicInfo.listId }).then((url: string) => {
if (musicInfo.id != playMusicInfo.musicInfo?.id) return
if (musicInfo.id != playMusicInfo.musicInfo?.id || url == _musicInfo.pic) return
setMusicInfo({ pic: url })
window.app_event.picUpdated()
}).catch(_ => _)
Expand Down Expand Up @@ -198,7 +198,7 @@ const handlePlay = () => {
setMusicUrl(musicInfo)

void getPicPath({ musicInfo, listId: playMusicInfo.listId }).then((url: string) => {
if (musicInfo.id != playMusicInfo.musicInfo?.id) return
if (musicInfo.id != playMusicInfo.musicInfo?.id || url == _musicInfo.pic) return
setMusicInfo({ pic: url })
window.app_event.picUpdated()
}).catch(_ => _)
Expand Down

0 comments on commit 75750ad

Please sign in to comment.