mirror of
https://github.com/SuperBFG7/ympd
synced 2025-01-13 19:00:37 +00:00
Fix: get current song only on song change
This commit is contained in:
parent
ceb694b7b2
commit
61adcb1c59
@ -1055,7 +1055,8 @@ function parseState(obj) {
|
||||
setCounter(obj.data.currentSongId, obj.data.totalTime, obj.data.elapsedTime);
|
||||
|
||||
//Get current song
|
||||
sendAPI({"cmd": "MPD_API_PLAYER_CURRENT_SONG"}, songChange);
|
||||
if (lastState && lastState.data.currentSongId != obj.data.currentSongId)
|
||||
sendAPI({"cmd": "MPD_API_PLAYER_CURRENT_SONG"}, songChange);
|
||||
//clear playback card if not playing
|
||||
if (obj.data.songPos == '-1') {
|
||||
domCache.currentTrack.innerText = 'Not playing';
|
||||
|
Loading…
Reference in New Issue
Block a user