Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
fix prompt menu
datawhoresf0ace9239390
diff --git a/cyberdrop_dl/clients/hash_client.py b/cyberdrop_dl/clients/hash_client.pyindex da64fd2f8..ac6505fbe 100644--- a/cyberdrop_dl/clients/hash_client.py+++ b/cyberdrop_dl/clients/hash_client.py@@ -119,7 +119,7 @@ class HashClient:# Filter out files with the same path as any file in other_filesfiltered_matches = [match for match in all_matches if str(match) not in other_files]#Filter files based on if the file exists- filtered_matches = list(filter(lambda x: x.exists() if not self.manager.config_manager.global_settings_data['Dupe_Cleanup_Options']['count_missing_as_existing'] else True,filtered_matches ))+ filtered_matches = list(filter(lambda x: x.exists(),filtered_matches ))#what do do with prev matches and current fileif not self.manager.config_manager.global_settings_data['Dupe_Cleanup_Options']['keep_prev_download']:diff --git a/cyberdrop_dl/managers/config_manager.py b/cyberdrop_dl/managers/config_manager.pyindex 740af923a..0c3c20b9a 100644--- a/cyberdrop_dl/managers/config_manager.py+++ b/cyberdrop_dl/managers/config_manager.py@@ -178,8 +178,6 @@ class ConfigManager:self.global_settings_data['Dupe_Cleanup_Options']['keep_prev_download']self.global_settings_data['Dupe_Cleanup_Options']['keep_new_download'] = \self.global_settings_data['Dupe_Cleanup_Options']['keep_new_download']- self.global_settings_data['Dupe_Cleanup_Options']['count_missing_as_existing'] = \- self.global_settings_data['Dupe_Cleanup_Options']['count_missing_as_existing']self.global_settings_data['UI_Options']['refresh_rate'] = int(diff --git a/cyberdrop_dl/ui/prompts/settings_global_prompts.py b/cyberdrop_dl/ui/prompts/settings_global_prompts.pyindex d9105835c..a06fc51cf 100644--- a/cyberdrop_dl/ui/prompts/settings_global_prompts.py+++ b/cyberdrop_dl/ui/prompts/settings_global_prompts.py@@ -229,51 +229,39 @@ together during deduplication processchoices=[Choice(True,"True"),Choice(False,"False")],vi_mode=manager.vi_mode,).execute()- keep_prev = inquirer.select(- message="Keep at least 1 previously hashed file when unduping",- long_instruction=- """- If False then all previously hashed files will be deleted, when a prev hash match is found- """,- default=manager.config_manager.global_settings_data['Dupe_Cleanup_Options']['keep_prev_download'],- choices=[Choice(True,"True"),Choice(False,"False")],++ dedupe_already_downloaded = inquirer.select(+ message="How to handle files already on system: ",+ default=manager.config_manager.global_settings_data['Dupe_Cleanup_Options']['dedupe_already_downloaded'],+ choices=[Choice(True,"Mark Existing Files as 'new'"),Choice(False,"Skip Existing Files")],vi_mode=manager.vi_mode,).execute()keep_current = inquirer.select(- message="Keep at least 1 new file when unduping",- long_instruction=- """- File is always kept if not in hash table- If False and the current file is in the hash table, then the current file will be deleted- """,+ message="What to do with new file when deduping: ",+ long_instruction="Files are only deleted if they existed in db before the current run",default=manager.config_manager.global_settings_data['Dupe_Cleanup_Options']['keep_new_download'],- choices=[Choice(True,"True"),Choice(False,"False")],+ choices=[Choice(True,"Keep a newfile"),Choice(False,"Delete all new files")],vi_mode=manager.vi_mode,).execute()-- count_missing_files = inquirer.select(- message="Counts moved/deleted files as a valid previous download",- default=manager.config_manager.global_settings_data['Dupe_Cleanup_Options']['count_missing_as_existing'],- long_instruction="Removes the 'existing' check for files marked as previous",- choices=[Choice(True,"True"),Choice- (False,"False")],++ keep_prev = inquirer.select(+ message="What to do with previous file(s) when deduping:",+ default=manager.config_manager.global_settings_data['Dupe_Cleanup_Options'],+ long_instruction="Previous files are files not in generated from the links provided",+ choices=[Choice(True,"Keep a previous file "),Choice(False,"Delete all previous files")],vi_mode=manager.vi_mode,).execute()- dedupe_already_downloaded = inquirer.select(- message="Remove duplicates from already existing files: ",- long_instruction="marks already existing files as 'new'",- default=manager.config_manager.global_settings_data['Dupe_Cleanup_Options']['dedupe_already_downloaded'],- choices=[Choice(True,"True"),Choice(False,"False")],- vi_mode=manager.vi_mode,- ).execute()+++manager.config_manager.global_settings_data['Dupe_Cleanup_Options']['delete_after_download'] = delete_aftermanager.config_manager.global_settings_data['Dupe_Cleanup_Options']['hash_while_downloading'] = hash_while_downloadingmanager.config_manager.global_settings_data['Dupe_Cleanup_Options']['keep_prev_download'] = keep_prevmanager.config_manager.global_settings_data['Dupe_Cleanup_Options']['keep_new_download'] = keep_current- manager.config_manager.global_settings_data['Dupe_Cleanup_Options']['count_missing_as_existing'] = count_missing_files+manager.config_manager.global_settings_data['Dupe_Cleanup_Options']['dedupe_already_downloaded'] = dedupe_already_downloaded\ No newline at end of filediff --git a/cyberdrop_dl/utils/args/config_definitions.py b/cyberdrop_dl/utils/args/config_definitions.pyindex 2591f4e16..bf48f87d4 100644--- a/cyberdrop_dl/utils/args/config_definitions.py+++ b/cyberdrop_dl/utils/args/config_definitions.py@@ -141,7 +141,6 @@ global_settings: Dict = {"keep_prev_download": False,"keep_new_download": True,- "count_missing_as_existing": False,"dedupe_already_downloaded": False},