Index: channels/__init__.py ================================================================== --- channels/__init__.py +++ channels/__init__.py @@ -139,10 +139,16 @@ 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 += [ @@ -250,11 +256,18 @@ 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): - return self.stations() [self.rowno()] + no = 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)