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

⌈⌋ ⎇ branch:  streamtuner2


Diff

Differences From Artifact [a30ec4e248]:

To Artifact [31ed68ff70]:


9
10
11
12
13
14
15
16
17
18

19
20
21
22
23
24
25
# documentation: http://dirble.com/developer/api
#
# Provides a nice JSON API, so is easy to support.
#
# However useful station information (homepage, etc.) only
# with extraneous requests. So just for testing as of now.
#
# Uh, and API is appearently becoming for-pay (two days
# after writing this plugin;). So ST2 users may have to
# request their own Dirble.com key probably.

#


import re
import json
from config import conf, dbg, __print__
from channels import *







<
|
<
>







9
10
11
12
13
14
15

16

17
18
19
20
21
22
23
24
# documentation: http://dirble.com/developer/api
#
# Provides a nice JSON API, so is easy to support.
#
# However useful station information (homepage, etc.) only
# with extraneous requests. So just for testing as of now.
#

# ST2 users may have to get a custom Dirble.com key;

# last one got disabled.
#


import re
import json
from config import conf, dbg, __print__
from channels import *
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
         "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 = {}
    
    base = "http://api.dirble.com/v1/%s/apikey/%s/"
    cid = "84be582567ff418c9ba94d90d075d7fee178ad60"


    # Retrieve cat list and map
    def update_categories(self):
        self.categories = []
        # Main categories
        for row in self.api("primaryCategories"):







|





|







42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
         "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 super slow, as it requires one extra request for each station.)"
        }
    ]    
    catmap = {}
    
    base = "http://api.dirble.com/v1/%s/apikey/%s/"
    cid = "a0bdd7b8efc2f5d1ebdf1728b65a07ece4c73de5"


    # Retrieve cat list and map
    def update_categories(self):
        self.categories = []
        # Main categories
        for row in self.api("primaryCategories"):