Beispiel #1
0
    def on_top10_refresh(self):
        if not have_internet():
            return

        self.set_buttons_enabled(False)
        self.top['list'].clear()
        self.top_thread.start()
Beispiel #2
0
    def _search_to_manga_download(self):
        if not have_internet():
            return

        self.search['next_button'].setEnabled(False)
        selected_index = self.search['table'].selectedIndexes()[0].row()
        self.load_manga(self.codec.search_result[selected_index]['href'])
Beispiel #3
0
    def load_manga(self, manga_link):
        if not have_internet():
            return

        self.set_controls(False)

        self.loader.manga_link = manga_link
        self.loader_thread.start()
        QListWidget.item
Beispiel #4
0
    def on_previous_page(self):
        if not have_internet():
            return

        last_page = self.popular_codec.page
        self.popular_codec.decrement_page()

        if not self.popular_codec.page == last_page:
            self.on_refresh()
Beispiel #5
0
    def on_refresh(self):
        if not have_internet():
            return

        self.popular_button_enabled(False)
        self.popular['table'].clear()

        self.popular_codec.thumbnails = self.settings.settings['download_thumbnails']
        self.popular_thread.start()
Beispiel #6
0
    def _search(self):
        if not have_internet():
            return

        # disable controls
        self._set_controls(False)

        self.codec.keyword = self.codec.search_prefix + self.search['input'].text()

        self.search_thread.start()
Beispiel #7
0
    def start_download_task(self, manga_title: str, chapter_list: list):
        if not have_internet():
            return

        manga_title = re.sub(r'[/\\:*"<>|\?]', '', manga_title)
        self.path = os.path.realpath(
            os.path.join(Settings.manga_save_path, manga_title))
        self.progress['composite_label'].setText('')
        self.progress['chapter_list'].hide()
        self.progress['open_button'].hide()
        self.stack.setCurrentIndex(3)

        self.downloader.manga_name = manga_title
        self.progress['title_label'].setText(manga_title)

        self.downloader.chapter_list = chapter_list
        self.downloader.compile_jpg = self.settings.settings['composite_jpg']
        self.downloader.compile_pdf = self.settings.settings['composite_pdf']
        self.downloader.keep_originals = self.settings.settings[
            'keep_originals']

        self.downloader_thread.start()
Beispiel #8
0
    def on_favourite_refresh(self):
        if not have_internet():
            return

        self.set_favourite_controls(False)
        self.favourite_thread.start()