Implement new .resolve_urn() hook (replacing .row() override),
which is added automatically now in ChannelPlugin init.
check-in: e4fa4859c6 user: mario tags: trunk
Also perform an action.resolve_urn() right when accessing a row. Thus the
stremaing lsits get updated on any .row() acccess (= now centrally covered).
check-in: 2859a51985 user: mario tags: trunk
Implement resolve_urn() and handlers to look up "urn:xxx:iii" stream urls
pripr playback. (Currently just used by reciva and delicast. Now allows to
remove channel.row() override.)
check-in: 5b63504d79 user: mario tags: trunk
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 functionif 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 processorsifnotself.prepare_filters:self.prepare_filters +=[self.prepare_filter_icons,]
# Return ListStore object and Iterator for currently selected row in gtk.TreeView station listdef model_iter(self):returnself.gtk_list.get_selection().get_selected()# Currently selected entry in stations list, return complete data dictdef row(self):no=self.rowno()returnself.stations()[self.rowno()]ls =self.stations() row = ls[no]# resolve stream url for some pluginsif row["url"].startswith("urn:"): row = action.resolve_urn(row) ls[no]= rowreturn row# Fetches a single varname from currently selected station entrydef selected(self, name="url"):returnself.row().get(name)# Inject status icon into currently selected row (used by main.bookmark() call)def row_icon(self, gtkIcon = gtk.STOCK_ABOUT):