diff --git a/ircradio/templates/index.html b/ircradio/templates/index.html index 3e0ca18..34ff5ac 100644 --- a/ircradio/templates/index.html +++ b/ircradio/templates/index.html @@ -16,7 +16,7 @@
|
@@ -186,6 +186,7 @@ let blob = JSON.parse(data); radio_data = blob; + let listeners = 0; for (let radio_station of radio_station_ids) { if(!blob.hasOwnProperty(radio_station)) continue; @@ -199,10 +200,17 @@ } sel_radio_cards[rs.id].find('.title_str').text(song.title); - labelSetListeners(rs.id, rs.listeners); + //labelSetListeners(rs.id, rs.listeners); + listeners += rs.listeners; sel_radio_cards[rs.id].find('.progress_str').text(song.progress_str); } } + + if(listeners >= 1) { + $('p.lead').text(listeners_str(listeners)); + } else { + $('p.lead').text('Enjoy the music :)'); + } } // btnMeta: skip, boo, tune