Index: channels/bookmarks.py ================================================================== --- channels/bookmarks.py +++ channels/bookmarks.py @@ -103,11 +103,11 @@ row["favourite"] = 1 if not row.get("favicon"): pass# row["favicon"] = favicon.file(row.get("homepage")) if not row.get("listformat"): row["listformat"] = self.parent.channel().listformat - if not row.get("extra"): + if not len(row.get("extra", "")): row["extra"] = self.parent.channel().module # append to storage self.streams["favourite"].append(row) self.save() ADDED contrib/bookmarks_show_extra.py Index: contrib/bookmarks_show_extra.py ================================================================== --- contrib/bookmarks_show_extra.py +++ contrib/bookmarks_show_extra.py @@ -0,0 +1,43 @@ +# encoding: utf-8 +# api: streamtuner2 +# title: UI: bookmarks: show `extra` field +# description: Extra field in bookmarks list +# version: 0.0 +# type: feature +# category: ui +# config: - +# priority: rare +# +# Just injects the `extra` column for display +# +## +# Now some of the workarounds (clean treeview) wouldn't be necessary if this +# was loaded prior to bookmarks plugin. But alas we don't have #order: loading +# support in ST2 init/pluginconf. +# + +from config import * +import copy + +# Inject into .bookmarks.datamap[] +class bookmarks_show_extra (object): + plugin = "bookmarks_show_extra" + meta = plugin_meta() + + def __init__(self, parent): + bm = parent.bookmarks + # clean treeview + for c in bm.gtk_list.get_columns(): + bm.gtk_list.remove_column(c) + c.destroy() + # inject new column + bm.datamap = copy.deepcopy(bm.datamap) + bm.datamap.append( + ["Extra", 40, ["extra", str, "text", {}] ] + ) + # redraw treeview + bm.columns([]) + # @bug: does not update existing {text:IDX} attribute for columns, + # just happens to work for .append() + +