def add_to_downloader(self, download_items): for download_item in download_items: api.add_to_downloader(download_item) self.store_item(download_item) if conf.get_auto_switch_tab(): signals.switch_tab.emit(0) api.next_download()
def set_links(self): text = self.clipboard.text() if len(text) != self.len_old or text != self.text_old: urls = self.check_supported(self.check_text(text)) if urls: signals.add_downloads_to_check.emit(urls) signals.captured_links_count.emit(len(urls)) if conf.get_auto_switch_tab(): signals.switch_tab.emit(1) self.len_old = len(text) self.text_old = text
def load(self): if conf.get_tray_available(): self.tray_box.toggle() if conf.get_auto_switch_tab(): self.switch_tab_box.toggle()