def clean_all(): aria2.remove_all(True) get_client().torrents_delete(torrent_hashes="all", delete_files=True) try: shutil.rmtree(DOWNLOAD_DIR) except FileNotFoundError: pass
def exit_clean_up(signal, frame): try: LOGGER.info("Please wait, while we clean up the downloads and stop running downloads") aria2.remove_all(True) shutil.rmtree(DOWNLOAD_DIR) sys.exit(0) except KeyboardInterrupt: LOGGER.warning("Force Exiting before the cleanup finishes!") sys.exit(1)
def clean_all(): aria2.remove_all(True) qbc = get_client() qbc.torrents_delete(torrent_hashes="all", delete_files=True) qbc.app_shutdown() try: rmtree(DOWNLOAD_DIR) except FileNotFoundError: pass
def clean_all(): aria2.remove_all(True) shutil.rmtree(DOWNLOAD_DIR)
def clean_all(): aria2.remove_all(True) try: shutil.rmtree(DOWNLOAD_DIR) except FileNotFoundError: pass
def clean_all(): aria2.remove_all(True) start_cleanup()
def clean_all(): aria2.remove_all(True)