def show_replay_radio_channels(date): raiplay = RaiPlayRadio() radio_stations = raiplay.getChannels() for station in radio_stations: liStyle = xbmcgui.ListItem(station["channel"]) liStyle.setArt({"thumb": station["stillFrame"]}) addDirectoryItem({"mode": "replay", "media": "radio", "channel_id": station["channel"].encode("utf-8"), "date": date}, liStyle) xbmcplugin.endOfDirectory(handle=handle, succeeded=True)
def show_radio_stations(): raiplay = RaiPlayRadio() radio_stations = raiplay.getChannels() for station in radio_stations: liStyle = xbmcgui.ListItem(station["channel"]) liStyle.setArt({"thumb": station["stillFrame"]}) liStyle.setInfo("music", {}) if 'contentUrl' in station['audio']: addLinkItem({"mode": "play", "url": station["audio"]["contentUrl"]}, liStyle) else: addLinkItem({"mode": "play", "url": station["audio"]["castUrl"]}, liStyle) xbmcplugin.endOfDirectory(handle=handle, succeeded=True)