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

⌈⌋ ⎇ branch:  streamtuner2


Check-in [e5d39589b8]

Overview
Comment:Allow use of custom Dirble API key.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e5d39589b8e2ce46c15f4928e8eb276ce5128411
User & Date: mario on 2014-08-12 18:45:38
Other Links: manifest | tags
Context
2014-08-15
00:46
Make channel tab positions configurable. check-in: 395935d038 user: mario tags: trunk
2014-08-12
18:45
Allow use of custom Dirble API key. check-in: e5d39589b8 user: mario tags: trunk
18:41
Filter out duplicate streams by title check-in: 509c3b3a70 user: mario tags: trunk
Changes

Modified channels/dirble.py from [8fa0a0e272] to [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