43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
streams = {"favourite":[finder_song], "search":[], "scripts":[], "timer":[], "history":[], }
# cache list, to determine if a PLS url is bookmarked
urls = []
def gui(self, parent):
GenericChannel.gui(self, parent)
parent.notebook_channels.set_menu_label_text(parent.v_bookmarks, "bookmarks")
# this channel does not actually retrieve/parse data from anywhere
def update_categories(self):
pass
# but category sub-plugins might provide a hook
category_plugins = {}
def update_streams(self, cat):
if cat in self.category_plugins:
return self.category_plugins[cat].update_streams(cat) or []
else:
return self.streams.get(cat, [])
# streams are already loaded at instantiation
#def first_show(self):
# pass
# all entries just come from "bookmarks.json"
def cache(self):
# stream list
cache = conf.load(self.module)
if (cache):
|
<
>
|
>
|
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
streams = {"favourite":[finder_song], "search":[], "scripts":[], "timer":[], "history":[], }
# cache list, to determine if a PLS url is bookmarked
urls = []
def gui(self, parent):
parent.notebook_channels.set_menu_label_text(parent.v_bookmarks, "bookmarks")
GenericChannel.gui(self, parent)
# this channel does not actually retrieve/parse data from anywhere
def update_categories(self):
pass
# but category sub-plugins might provide a hook
category_plugins = {}
def update_streams(self, cat):
if cat in self.category_plugins:
return self.category_plugins[cat].update_streams(cat) or []
else:
return self.streams.get(cat, [])
# streams are already loaded at instantiation
#def first_show(self):
# print "first_show", len(self.streams["favourite"])
# GenericChannel.first_show(self)
# all entries just come from "bookmarks.json"
def cache(self):
# stream list
cache = conf.load(self.module)
if (cache):
|