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

โŒˆโŒ‹ โŽ‡ branch:  streamtuner2


Check-in [05806261b3]

Overview
SHA1 Hash:05806261b3656675ffe9e56d981a273314f53244
Date: 2015-05-11 11:18:09
User: mario
Comment:Switch dirble plugin to predeclare encoding="utf-8" for speed.
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2015-05-11
12:21
[494088b7d1] Change pluginconf lookups. Use only pkg basenames for configuration, but override channels.__path__ directly in module. Thus pluginconf can convert `plugin_base` into path list for module_list() scanning. (user: mario, tags: trunk)
11:18
[05806261b3] Switch dirble plugin to predeclare encoding="utf-8" for speed. (user: mario, tags: trunk)
11:17
[901ee2c6b2] Disable iTunes plugin, no alternative resource. (user: mario, tags: trunk)
Changes

Modified PACKAGING from [1814db3da6] to [4883c4bdc9].

30
31
32
33
34
35
36

37






38
39
40
41
42
43
44


Renames
-------

 ยท bookmarks, configdialog, streamedit were extracted into
   channels/ - which is why the main module got lighter.

 ยท uikit.py is the new mygtk






 

Aux files
---------

 โ†’ Help files still need to go to share/docs/streamtuner2/help/
   unless you patch the source.







>

>
>
>
>
>
>







30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51


Renames
-------

 ยท bookmarks, configdialog, streamedit were extracted into
   channels/ - which is why the main module got lighter.

 ยท uikit.py is the new mygtk

 ยท contrib/ contains more add-on modules, which could just
   be packaged into channels/ - selectively.

   (Alternatively users can download and activate those
   themselves later.)
 

Aux files
---------

 โ†’ Help files still need to go to share/docs/streamtuner2/help/
   unless you patch the source.

Modified channels/dirble.py from [db262a5d06] to [8581a994c5].

106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126


    # Patch API url together, send request, decode JSON list
    def api(self, method, **params):
        params["token"] = conf.dirble_api_key or self.key
        try:
            # HTTP request and JSON decoding take a while
            r = ahttp.get(self.base.format(method), params)
            r = json.loads(r)
            if isinstance(r, dict) and "error" in r:
                log.ERR(r["error"])
                raise Exception
            # cut down stream list
            if len(r) > int(conf.max_streams):
                del r[int(conf.max_streams):]
        except Exception as e:
            log.ERR("Dirble API retrieval failure:", e)
            r = []
        return r









|













106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126


    # Patch API url together, send request, decode JSON list
    def api(self, method, **params):
        params["token"] = conf.dirble_api_key or self.key
        try:
            # HTTP request and JSON decoding take a while
            r = ahttp.get(self.base.format(method), params, encoding="utf-8")
            r = json.loads(r)
            if isinstance(r, dict) and "error" in r:
                log.ERR(r["error"])
                raise Exception
            # cut down stream list
            if len(r) > int(conf.max_streams):
                del r[int(conf.max_streams):]
        except Exception as e:
            log.ERR("Dirble API retrieval failure:", e)
            r = []
        return r