Check-in [3072c80d83]
Overview
Comment: | Move channel.save() after column updating. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
3072c80d836bfcbcdc27cd20ed4fd912 |
User & Date: | mario on 2015-05-24 10:02:43 |
Other Links: | manifest | tags |
Context
2015-05-24
| ||
14:19 | Introduce action.handler{} callbacks to convert custom streaming URL types such as "audio/soundcloud". Unify backend code for .play/record/browser() calls. Reddit module just splits out domain name now, then checks for walledgarden links (filter option renamed). Introduce url_soundcloud plugin in favour of `soundcli` cmdline client setting. check-in: 23bbd97989 user: mario tags: trunk | |
10:02 | Move channel.save() after column updating. check-in: 3072c80d83 user: mario tags: trunk | |
10:02 | Lighter highlight color: for plugin options. check-in: 160f4dd660 user: mario tags: trunk | |
Changes
Modified channels/__init__.py from [9cd47dabe0] to [308143373d].
︙ | ︙ | |||
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 | def load(self, category, force=False, y=None): # called to early if not category: log.ERR("load(None)") return self.current = category # get data from cache or download if force or not category in self.streams: log.PROC("load", "update_streams") self.status("Updating streams...") self.status(-0.1) if category == "empty": new_streams = self.empty_stub else: new_streams = self.update_streams(category) # Postprocess new list of streams (e.g. assert existing title and url) if new_streams: try: new_streams = self.postprocess(new_streams) except Exception as e: log.ERR("Updating new streams, postprocessing failed:", e) # don't lose forgotten streams if conf.retain_deleted: self.streams[category] = new_streams + self.deleted_streams(new_streams, self.streams.get(category,[])) else: self.streams[category] = new_streams | > > < < < > > > > | 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 | def load(self, category, force=False, y=None): # called to early if not category: log.ERR("load(None)") return self.current = category do_save = False # get data from cache or download if force or not category in self.streams: log.PROC("load", "update_streams") self.status("Updating streams...") self.status(-0.1) if category == "empty": new_streams = self.empty_stub else: new_streams = self.update_streams(category) # Postprocess new list of streams (e.g. assert existing title and url) if new_streams: try: new_streams = self.postprocess(new_streams) do_save = True except Exception as e: log.ERR("Updating new streams, postprocessing failed:", e) # don't lose forgotten streams if conf.retain_deleted: self.streams[category] = new_streams + self.deleted_streams(new_streams, self.streams.get(category,[])) else: self.streams[category] = new_streams else: # parse error self.status("Category parsed empty.") self.streams[category] = self.nothing_found log.INFO("Oooops, parser returned nothing for category " + category) # Update treeview/model (if category is still selected) if self.current == category: log.UI("load() → uikit.columns({}.streams[{}])".format(self.module, category), [inspect.stack()[x][3] for x in range(1,5)]) uikit.do(self.columns, self.prepare(self.streams[category])) if y: uikit.do(self.gtk_list.scroll_to_point, 0, y + 1) # scroll to previous position, +1 px, because # somehow Gtk.TreeView else stumbles over itself when scrolling to the same position the 2nd time # save in cache if do_save: self.save() # unset statusbar self.status() # Called occasionally (by some plugins) while updating station list def update_streams_partially_done(self, entries): |
︙ | ︙ |