Check-in [8c1da4e0f7]
Overview
Comment: | Move status.progressbar init and cleanup into GenericChannel.load() |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
8c1da4e0f7c75d6c834e5cedb4f5c52b |
User & Date: | mario on 2014-05-26 15:32:28 |
Other Links: | manifest | tags |
Context
2014-05-26
| ||
16:32 | Comment out dbg.DATA prints, add some statusbar updating calls. check-in: fd4a1b208c user: mario tags: trunk | |
15:32 | Move status.progressbar init and cleanup into GenericChannel.load() check-in: 8c1da4e0f7 user: mario tags: trunk | |
14:06 | New Freebase topic IDs, fix progressbar for multi-page collecting. check-in: 95166f7d96 user: mario tags: trunk | |
Changes
Modified channels/_generic.py from [6c89a69b5c] to [80b2da3d25].
︙ | |||
182 183 184 185 186 187 188 189 190 191 192 193 194 195 | 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 | 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) |
︙ |
Modified channels/youtube.py from [2213612999] to [068cf22437].
︙ | |||
177 178 179 180 181 182 183 | 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | - | # retrieve and parse def update_streams(self, cat, force=0, search=None): entries = [] channels = self.categories[self.categories.index("my channels") + 1] |
︙ | |||
224 225 226 227 228 229 230 | 223 224 225 226 227 228 229 230 231 232 233 234 235 236 | - | entries.append( self.wrap3(row, {"genre": ""}) ) # empty entries else: entries = [dict(title="Placeholder for subcategories", genre="./.", playing="./.", url="http://youtube.com/")] # done |
︙ | |||
249 250 251 252 253 254 255 | 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | - - + | #-- Retrieve Youtube API query results # def api(self, method, ver=3, pages=5, **params): items = [] # URL and default parameters (base_url, defaults) = self.service[ver] |
︙ | |||
278 279 280 281 282 283 284 | 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 | - + | elif "pageInfo" in data and data["pageInfo"]["totalResults"] < 50: pages = 0 elif "nextPageToken" in data: params["pageToken"] = data["nextPageToken"] pages -= 1 else: pages = 0 |
︙ |
Modified st2.py from [9efbd2b2e3] to [131924495a].
︙ | |||
418 419 420 421 422 423 424 | 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 | - - - | sbar_cid = self.get_widget("statusbar").get_context_id("messages") # remove text while ((not text) and (type(text)==str) and len(sbar_msg)): sbar_msg.pop() mygtk.do(lambda:self.statusbar.pop(sbar_cid)) # progressbar if (type(text)==float): |
︙ |