Fixed updateLastPlayedSong() wrong current song checking.
This commit is contained in:
parent
fe823ae56f
commit
080954fe5f
@ -23,9 +23,10 @@ function updateLastPlayedSong() {
|
||||
fetch('/lastsong')
|
||||
.then(r => r.json())
|
||||
.then(last_played => {
|
||||
let { cur_artist, cur_song } = $('radio-song').innerText.split(' - ');
|
||||
let cur_artist = $('last-played').firstChild.lastChild.firstChild.innerText;
|
||||
let cur_title = $('last-played').firstChild.lastChild.lastChild.innerText;
|
||||
|
||||
if (last_played.artist == cur_artist && last_played.title == cur_song)
|
||||
if (last_played.artist == cur_artist && last_played.title == cur_title)
|
||||
return;
|
||||
|
||||
$('last-played').firstChild.firstChild.remove();
|
||||
|
Loading…
Reference in New Issue
Block a user