Index: channels/radionomy.py ================================================================== --- channels/radionomy.py +++ channels/radionomy.py @@ -1,10 +1,9 @@ # encoding: UTF-8 # api: streamtuner2 # title: Radionomy # description: Modern radio directory and streaming provider -# color: #ffcc77 # url: http://radionomy.com/ # version: 0.5 # type: channel # category: radio # config: - @@ -123,15 +122,17 @@ # Retrieve en/OnAir/Update for per-UID song titles def onair_update(self, req): if conf.radionomy_update: try: d = json.loads( - ahttp.get("https://www.radionomy.com/en/OnAir/Update", post=1, referer=req) + ahttp.get("https://www.radionomy.com/en/OnAir/Update", post=1, referer=req) ) - if d: - self.playing.update( - {row["RadioUID"]: "{Title} - {Artist}".format(**row) for row in d} - ) + if not d: + return + print d + self.playing.update( + {row["RadioUID"]: "{Title} - {Artist}".format(**row) for row in d} + ) except Exception as e: log.ERR("Radionomy title update:", e)