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

⌈⌋ ⎇ branch:  streamtuner2


Check-in [9ed03bc901]

Overview
Comment:Use plain module_list() for config_dialog.add_plugins() instead of traversing main.channels and main.features separately. Uses module= lookup with hardwired "channels." and ".py" retrieval.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9ed03bc901cc43b81c02cf8363afec567d299ce3
User & Date: mario on 2015-04-04 01:50:03
Other Links: manifest | tags
Context
2015-04-04
01:50
Document fossil repo specific URLs (changelog/, cat/, trunk, version, zip/, tar/). check-in: c39a33b3da user: mario tags: trunk
01:50
Use plain module_list() for config_dialog.add_plugins() instead of traversing main.channels and main.features separately. Uses module= lookup with hardwired "channels." and ".py" retrieval. check-in: 9ed03bc901 user: mario tags: trunk
01:48
Catch HTTP errors for reload_categories(). Provide a descriptive .placeholder[] and .empty_stub[] stream list for channels reloading. check-in: 9d6c4e81f8 user: mario tags: trunk
Changes

Modified channels/configwin.py from [b3b5b37bef] to [af833a9f7e].

104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
        else:
            return gtk.STOCK_CANCEL
        


    # iterate over channel and feature plugins
    def add_plugins(self):
        ls = {}
        for name in module_list():
            if name in self.channels:
                ls[name] = self.channels[name].meta
            elif name in self.features:
                ls[name] = self.features[name].meta
            else:
                ls[name] = plugin_meta(conf.share+"/channels/"+name+".py")
        for name,meta in sorted(ls.items(), key=lambda e: e[1]["type"]+e[1]["title"].lower(), reverse=False):
            self.add_plg(name, meta)
        #self.plugin_options.pack_start(uikit.label("\n<b>Feature</b> plugins add categories, submenu entries, or other extensions.\n", 500, 1))

    # add configuration setting definitions from plugins
    plugin_text = "<span size='larger' weight='heavy'>%s</span> <span style='italic' foreground='slate blue'>(%s/%s)</span> <span weight='bold' foreground='orange'>%s</span>\n<span size='smaller' stretch='ultraexpanded'>%s</span>"
    def add_plg(self, name, meta):
        # add plugin load entry
        cb = gtk.CheckButton(name)
        cb.set_sensitive(not meta.get("priority") in ("core", "required", "builtin"))







|
|
|
|
|
|
|
|


|







104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
        else:
            return gtk.STOCK_CANCEL
        


    # iterate over channel and feature plugins
    def add_plugins(self):
        ls = dict([(name, plugin_meta(module=name)) for name in module_list()])
        #for name in module_list():
        #    if name in self.channels:
        #        ls[name] = self.channels[name].meta
        #    elif name in self.features:
        #        ls[name] = self.features[name].meta
        #    else:
        #        ls[name] = plugin_meta(module=name)
        for name,meta in sorted(ls.items(), key=lambda e: e[1]["type"]+e[1]["title"].lower(), reverse=False):
            self.add_plg(name, meta)


    # add configuration setting definitions from plugins
    plugin_text = "<span size='larger' weight='heavy'>%s</span> <span style='italic' foreground='slate blue'>(%s/%s)</span> <span weight='bold' foreground='orange'>%s</span>\n<span size='smaller' stretch='ultraexpanded'>%s</span>"
    def add_plg(self, name, meta):
        # add plugin load entry
        cb = gtk.CheckButton(name)
        cb.set_sensitive(not meta.get("priority") in ("core", "required", "builtin"))