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

⌈⌋ ⎇ branch:  streamtuner2


Diff

Differences From Artifact [7b1d9a7374]:

To Artifact [0838ff195b]:


137
138
139
140
141
142
143






144
145
146
147
148
149
150
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156







+
+
+
+
+
+







        self.meta = plugin_meta(src = inspect.getcomments(inspect.getmodule(self)))
        self.config = self.meta.get("config", [])
        self.title = self.meta.get("title", self.module)

        # add default options values to config.conf.* dict
        conf.add_plugin_defaults(self.meta, self.module)
        
        # extra init function
        if hasattr(self, "init2"):
            self.init2(parent)
        if hasattr(self, "resolve_urn"):
            action.handler["urn:%s" % self.module] = self.resolve_urn
        
        # Only if streamtuner2 is run in graphical mode        
        if (parent):
            # Update/display stream processors
            if not self.prepare_filters:
                self.prepare_filters += [
                    self.prepare_filter_icons,
                ]
248
249
250
251
252
253
254

255







256
257
258
259
260
261
262
254
255
256
257
258
259
260
261

262
263
264
265
266
267
268
269
270
271
272
273
274
275







+
-
+
+
+
+
+
+
+








    # Return ListStore object and Iterator for currently selected row in gtk.TreeView station list
    def model_iter(self):
        return self.gtk_list.get_selection().get_selected()

    # Currently selected entry in stations list, return complete data dict
    def row(self):
        no = self.rowno()
        return self.stations() [self.rowno()]
        ls = self.stations()
        row = ls[no]
        # resolve stream url for some plugins
        if row["url"].startswith("urn:"):
            row = action.resolve_urn(row)
            ls[no] = row
        return row
        
    # Fetches a single varname from currently selected station entry
    def selected(self, name="url"):
        return self.row().get(name)
    
    # Inject status icon into currently selected row (used by main.bookmark() call)
    def row_icon(self, gtkIcon = gtk.STOCK_ABOUT):