Пример #1
0
 def updateAll(self):
   # create an UpdateWindow
   self.log.info('updateAll == Create update window')
   update_window = UpdateWindow.create(self)
   
   # ask the mmachine to start the update
   self.current_action = self.mmachine.do.updateAll()
   update_window.setAction(self.current_action)
   
   # monitor the action
   self.log.info('updateAll == Start refresh timeout')
   update_window.startRefreshTimeout()
Пример #2
0
 def updateSingleManga(self, manga):
   # create an UpdateWindow
   self.log.info('updateAll == Create update window')
   update_window = UpdateWindow.createForSingleManga(self)
   
   # ask the mmachine to start the update
   self.current_action = self.mmachine.do.updateSingleManga(manga)
   update_window.setAction(self.current_action)
   
   # monitor the action
   self.log.info('updateAll == Start timeout')
   GObject.timeout_add(300, update_window.refresh)
Пример #3
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)