diff options
Diffstat (limited to 'client/js')
-rw-r--r-- | client/js/radio_emulator.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/client/js/radio_emulator.js b/client/js/radio_emulator.js index 2388196..592426b 100644 --- a/client/js/radio_emulator.js +++ b/client/js/radio_emulator.js @@ -267,9 +267,13 @@ function syncOnDOMfromListCallback(now, hash_of_list, json) } function appendPreviouslyPlayedShows(listItem){ - var tmp = document.createElement('pre'); - tmp.innerText = JSON.stringify(listItem, null, 2); - placeholders.previouslyPlayed.append(tmp); + if ( document.querySelector(`#s-${listItem.hash}`) === null ) + { + var tmp = document.createElement('pre'); + tmp.id = `s-${listItem.hash}`; + tmp.innerText = JSON.stringify(listItem, null, 2); + placeholders.previouslyPlayed.append(tmp); + } } function listCallback(json, params) |