Merge pull request 'Use song name from AzuraCast instead of from Icecast' (#11) from khuxkm/bitbot-modules:master into master

Reviewed-on: #11
This commit is contained in:
Ben Harris 2022-03-02 16:04:47 +00:00
commit bf91f589fc
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