def load(self):
def on_list_task(info, error=None):<EOL><INDENT>self.loading_spin.stop()<EOL>self.loading_spin.hide()<EOL>if not info:<EOL><INDENT>self.app.toast(_('<STR_LIT>'))<EOL><DEDENT>if error or not info:<EOL><INDENT>logger.error('<STR_LIT>' % (info, error))<EOL>return<EOL><DEDENT>tasks = info['<STR_LIT>']<EOL>for task in tasks:<EOL><INDENT>self.liststore.append([<EOL>task['<STR_LIT>'],<EOL>task['<STR_LIT>'],<EOL>task['<STR_LIT>'],<EOL>task['<STR_LIT>'],<EOL><NUM_LIT:0>,<EOL><NUM_LIT:0>,<EOL>int(task['<STR_LIT:status>']),<EOL><NUM_LIT:0>,<EOL>'<STR_LIT:0>',<EOL>gutil.escape(task['<STR_LIT>'])<EOL>])<EOL><DEDENT>self.scan_tasks()<EOL>nonlocal start<EOL>start = start + len(tasks)<EOL>if info['<STR_LIT>'] > start:<EOL><INDENT>gutil.async_call(pcs.cloud_list_task, self.app.cookie,<EOL>self.app.tokens, start, callback=on_list_task)<EOL><DEDENT><DEDENT>self.loading_spin.start()<EOL>self.loading_spin.show_all()<EOL>start = <NUM_LIT:0><EOL>gutil.async_call(pcs.cloud_list_task, self.app.cookie, self.app.tokens,<EOL>start, callback=on_list_task)<EOL>
获取当前的离线任务列表