def searchMangaChapters(self, manga, process, search_type): self.log.info('searchMangaChapters == Manga: ' + manga.getName() ) # create a searching window self.log.info('searchMangaChapters == Create window') if search_type == ChaptersListWindow.MODE_EDIT: chapters_window = ChaptersListWindow.createToEdit(process, manga) elif search_type == ChaptersListWindow.MODE_DOWNLOAD: chapters_window = ChaptersListWindow.createToDownload(process, manga) else: chapters_window = ChaptersListWindow.createToAdd(process, manga) # start the search self.current_action = self.mmachine.do.searchMangaChapters(manga) process.setAction(self.current_action) # monitor the action self.log.info('searchMangaChapters == Start timeout') GObject.timeout_add(300, process.chapterSearching, chapters_window)
def showChaptersWindow(self, chapters): self.chapters_list_window = ChaptersListWindow.createToEdit(self, self.manga, chapters)