Fixed UTF encoding issues
This commit is contained in:
@@ -70,19 +70,21 @@
|
||||
|
||||
<script>
|
||||
function fetchNowPlaying() {
|
||||
fetch('now_playing.php')
|
||||
.then(response => response.text())
|
||||
.then(data => {
|
||||
document.getElementById('now-playing').innerHTML = data;
|
||||
})
|
||||
.catch(error => {
|
||||
document.getElementById('now-playing').innerHTML = "Unable to load song data.";
|
||||
console.error('Error fetching song data:', error);
|
||||
});
|
||||
}
|
||||
// Fetch immediately and then every 15 seconds
|
||||
fetchNowPlaying();
|
||||
setInterval(fetchNowPlaying, 15000);
|
||||
fetch('now_playing.php')
|
||||
.then(response => response.arrayBuffer())
|
||||
.then(buffer => {
|
||||
const decoder = new TextDecoder('utf-8');
|
||||
const data = decoder.decode(buffer);
|
||||
document.getElementById('now-playing').innerHTML = data;
|
||||
})
|
||||
.catch(error => {
|
||||
document.getElementById('now-playing').innerHTML = "Unable to load song data.";
|
||||
console.error('Error fetching song data:', error);
|
||||
});
|
||||
}
|
||||
// Fetch immediately and then every 15 seconds
|
||||
fetchNowPlaying();
|
||||
setInterval(fetchNowPlaying, 15000);
|
||||
</script>
|
||||
</div>
|
||||
<p><span style = "color:white;">Add <a href="https://radio.cyberpunklibrarian.nohost.me/rfe">Radio Free Elsewhere</a> to VLC or your favourite audio streaming app.</span></p>
|
||||
|
||||
Reference in New Issue
Block a user