Internet radio browser GUI for music/video streams from various directory services.

⌈⌋ ⎇ branch:  streamtuner2


Diff

Differences From Artifact [8fa0a0e272]:

To Artifact [3b96ae1b61]:


35
36
37
38
39
40
41





42
43
44
45
46
47
48
    homepage = "http://dirble.com/"
    has_search = True
    listformat = "audio/x-scpls"
    titles = dict(listeners=False, playing="Location")

    categories = []
    config = [





        {"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.)"
        }
    ]    
    catmap = {}







>
>
>
>
>







35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
    homepage = "http://dirble.com/"
    has_search = True
    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.)"
        }
    ]    
    catmap = {}
109
110
111
112
113
114
115
116
117
118
119
120
121
122
        return "http://dirble.com/station/" + name.lower();


    # 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:]]))
            r = json.loads(j);
        except:
            r = []
        return r









|






114
115
116
117
118
119
120
121
122
123
124
125
126
127
        return "http://dirble.com/station/" + name.lower();


    # Patch API url together, send request, decode JSON and whathaveyou
    def api(self, *params):
        method = params[0]
        try:
            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