182
183
184
185
186
187
188
189
190
191
192
193
194
195
|
# load data,
# update treeview content
def load(self, category, force=False):
# get data from cache or download
if (force or not category in self.streams):
__print__(dbg.PROC, "load", "update_streams")
new_streams = self.update_streams(category)
if new_streams:
# check and modify entry;
# assert that title and url are present
modified = []
|
>
>
|
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
|
# load data,
# update treeview content
def load(self, category, force=False):
# get data from cache or download
if (force or not category in self.streams):
__print__(dbg.PROC, "load", "update_streams")
self.parent.status("Updating streams...")
self.parent.status(-0.1)
new_streams = self.update_streams(category)
if new_streams:
# check and modify entry;
# assert that title and url are present
modified = []
|
227
228
229
230
231
232
233
234
235
236
237
238
239
240
|
# self.gtk_list.set_model(self.liststore[category])
#else: # currently list is new, had not been converted to gtk array before
# self.liststore[category] = \
mygtk.do(lambda:mygtk.columns(self.gtk_list, self.datamap, self.prepare(self.streams[category])))
# set pointer
self.current = category
pass
# store current streams data
def save(self):
conf.save("cache/" + self.module, self.streams, gz=1)
|
>
>
|
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
|
# self.gtk_list.set_model(self.liststore[category])
#else: # currently list is new, had not been converted to gtk array before
# self.liststore[category] = \
mygtk.do(lambda:mygtk.columns(self.gtk_list, self.datamap, self.prepare(self.streams[category])))
# set pointer
self.current = category
self.parent.status("")
self.parent.status(1.0)
pass
# store current streams data
def save(self):
conf.save("cache/" + self.module, self.streams, gz=1)
|