fix listener count
This commit is contained in:
parent
a391496a0e
commit
0fedcb1bd3
|
@ -78,13 +78,14 @@ class Module(ModuleManager.BaseModule):
|
|||
# get the song name directly from icecast
|
||||
icecast_data = utils.http.request(ICECAST_API_BASE + "/status-json.xsl").json()
|
||||
self.song = icecast_data["icestats"]["source"][0]["title"]
|
||||
self.listeners = sum(i["listeners"] for i in icecast_data["icestats"]["source"])
|
||||
|
||||
# azuracast's now playing info is broken
|
||||
# https://github.com/AzuraCast/AzuraCast/issues/3142
|
||||
# self.song = data["now_playing"]["song"]["text"]
|
||||
self.is_online = data["live"]["is_live"]
|
||||
self.dj = data["live"]["streamer_name"]
|
||||
self.listeners = data["listeners"]["current"]
|
||||
#self.listeners = data["listeners"]["current"]
|
||||
|
||||
def format_nowplaying(self):
|
||||
ret = ""
|
||||
|
|
Loading…
Reference in New Issue