@@ -37,10 +37,15 @@ listformat = "audio/x-scpls" titles = dict(listeners=False, playing="Location") categories = [] config = [ + {"name": "dirble_api_key", + "value": "", + "type": "text", + "description": "Custom API access key." + }, {"name": "dirble_fetch_homepage", "value": 0, "type": "boolean", "description": "Also fetch homepages when updating stations. (This is slow, as it requires one extra request for each.)" } @@ -111,12 +116,12 @@ # Patch API url together, send request, decode JSON and whathaveyou def api(self, *params): method = params[0] try: - j = http.get((self.base % (method, self.cid)) + "/".join([str(e) for e in params[1:]])) + j = http.get((self.base % (method, conf.dirble_api_key or self.cid)) + "/".join([str(e) for e in params[1:]])) r = json.loads(j); except: r = [] return r