@ -10,10 +10,10 @@ function update(){
@@ -10,10 +10,10 @@ function update(){
if(first==null){
playing='Mitte munnigi ei mängi prg';
}
elseif(first.artist!=undefined){
playing=first.artist+' - ';
playing+=first.title;
}else{
elseif(first.artist!=undefined){
playing=first.artist+' - ';
playing+=first.title;
}else{
playing+=first.title;
}
varnowPlaying=playing;
@ -31,16 +31,16 @@ function update_field(field, data){
@@ -31,16 +31,16 @@ function update_field(field, data){
}
functionupdate_listeners(json_obj){
varnowPlaying=getFirstPlaying(json_obj);
varnowPlaying=getFirstPlaying(json_obj);
if(nowPlaying!=null){
update_field('listeners1',nowPlaying.listeners);
}
}
}
functionautoupdate(){
update();
setInterval(function(){update();},30000);
setInterval(function(){update();},30000);
}
functionchange_bg(id){
@ -60,9 +60,9 @@ function getFirstPlaying(jsonObj){
@@ -60,9 +60,9 @@ function getFirstPlaying(jsonObj){
for(o=0;o<sources.length;o++){
if(sources[o].title!=undefined&&masterStreams.some(stream=>sources[o].listenurl.endsWith(stream))){//check if source has a title key AND belongs to masterStreams