Use song name from AzuraCast instead of from Icecast
Sometimes Azura has the metadata correct and Icecast doesn't.
This commit is contained in:
parent
3e8b957488
commit
d5c6d4fc73
|
@ -79,7 +79,7 @@ class Module(ModuleManager.BaseModule):
|
|||
# get the song name directly from icecast
|
||||
icecast_data = utils.http.request(ICECAST_API_BASE + "/status-json.xsl").json()
|
||||
np = icecast_data["icestats"]["source"]
|
||||
self.song = np[0]["yp_currently_playing"]
|
||||
self.song = data["now_playing"]["song"]["text"]
|
||||
self.listeners = sum(i["listeners"] for i in np)
|
||||
|
||||
# azuracast's now playing info is broken
|
||||
|
|
Loading…
Reference in New Issue