def search(self, widget): """Search for and add torrents to download queue.""" search_dialog = SearchDialog() response = yield search_dialog.run() if response == gtk.RESPONSE_YES: search_type = search_dialog.query_type query = search_dialog.query_text db_api = db_interface() results_dialog = ResultsDialog() if search_type != 0: results_dialog.get_torrent_list( db_api.find_by_filter(search_type, query)) else: results_dialog.get_torrent_list(db_api.get_all_columns()) response = yield results_dialog.run() if response == gtk.RESPONSE_YES: selected = results_dialog.selected for torrent in selected: component.get("Core").add_torrent_magnet(torrent, {})
def search(self, widget): """Search for and add torrents to download queue.""" search_dialog = SearchDialog() response = yield search_dialog.run() if response == gtk.RESPONSE_YES: search_type = search_dialog.query_type query = search_dialog.query_text db_api = db_interface() results_dialog = ResultsDialog() if search_type != 0: results_dialog.get_torrent_list(db_api.find_by_filter(search_type, query)) else: results_dialog.get_torrent_list(db_api.get_all_columns()) response = yield results_dialog.run() if response == gtk.RESPONSE_YES: selected = results_dialog.selected for torrent in selected: component.get("Core").add_torrent_magnet(torrent, {})
def search(self, widget): """UI to search for torrents to download""" searchWindow = SearchWindow() searchWindow.run() db_api = db_interface() searchWindow.get_torrent_list(db_api.get_all_columns())
def search(self, widget): """UI to search for torrents to download""" searchWindow = SearchWindow() searchWindow.run() test_list = list([dict([("title", "PoI"), ("size", "4"), ("seeds", 400), ("leechers", 299), ("url", "PoI.com"), ("date", "4/15/2016")])]) db_api = db_interface() searchWindow.get_torrent_list(db_api.get_all_columns())
def search(self, widget): """UI to search for torrents to download""" searchWindow = SearchWindow() searchWindow.run() test_list = list( [ dict( [ ("title", "PoI"), ("size", "4"), ("seeds", 400), ("leechers", 299), ("url", "PoI.com"), ("date", "4/15/2016"), ] ) ] ) db_api = db_interface() searchWindow.get_torrent_list(db_api.get_all_columns())