Пример #1
0
 def downloadChapters(self, manga, chapters):
   # create an UpdateWindow
   self.log.info('updateAll == Create update window')
   update_window = UpdateWindow.createForChaptersDownload(self)
   
   # sort chapters
   chapters = sorted(chapters, key = lambda chapter : chapter.getChapterNumber())
   
   # ask the mmachine to start the update
   self.current_action = self.mmachine.do.downloadChapters(manga, chapters)
   update_window.setAction(self.current_action)
   
   # monitor the action
   self.log.info('updateAll == Start timeout')
   GObject.timeout_add(300, update_window.refresh)