Use song name from AzuraCast instead of from Icecast

Sometimes Azura has the metadata correct and Icecast doesn't.
This commit is contained in:
Robert Miles 2022-03-02 15:45:58 +00:00
parent 3e8b957488
commit d5c6d4fc73
1 changed files with 1 additions and 1 deletions

View File

@ -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