Fix to show the correct song title #1

Merged
siinus merged 1 commits from varbavahearst/kahtlane-fm:master into master 5 years ago
  1. 5
      script.js

5
script.js

@ -32,7 +32,7 @@ function update_field(field, data){
function update_listeners(json_obj){ function update_listeners(json_obj){
var nowPlaying = getFirstPlaying(json_obj); var nowPlaying = getFirstPlaying(json_obj);
if(nowPlaying != null) { if (nowPlaying != null) {
update_field('listeners1', nowPlaying.listeners); update_field('listeners1', nowPlaying.listeners);
} }
} }
@ -54,6 +54,9 @@ function getFirstPlaying(jsonObj){
var sources = jsonObj.icestats.source; var sources = jsonObj.icestats.source;
var masterStreams = [ var masterStreams = [
'/live', '/live',
'/sai',
'/siinus',
'/viido',
] ]
for(o=0; o < sources.length; o++) { for(o=0; o < sources.length; o++) {

Loading…
Cancel
Save