Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
UI Refresh rate additional handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Jules-WinnfieldX committed Apr 22, 2024
1 parent ead5c3f commit f11ba41
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cyberdrop_dl/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "5.2.46"
__version__ = "5.2.47"
3 changes: 3 additions & 0 deletions cyberdrop_dl/managers/config_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ def _verify_settings_config(self) -> None:
self.settings_data['File_Size_Limits']['minimum_image_size'] = int(self.settings_data['File_Size_Limits']['minimum_image_size'])
self.settings_data['File_Size_Limits']['minimum_video_size'] = int(self.settings_data['File_Size_Limits']['minimum_video_size'])
self.settings_data['File_Size_Limits']['minimum_other_size'] = int(self.settings_data['File_Size_Limits']['minimum_other_size'])

self.settings_data['Runtime_Options']['ui_refresh_rate'] = int(self.settings_data['Runtime_Options']['ui_refresh_rate'])
self.settings_data['Runtime_Options']['log_level'] = int(self.settings_data['Runtime_Options']['log_level'])

self.global_settings_data['General']['max_file_name_length'] = int(self.global_settings_data['General']['max_file_name_length'])
self.global_settings_data['General']['max_folder_name_length'] = int(self.global_settings_data['General']['max_folder_name_length'])
Expand Down
9 changes: 9 additions & 0 deletions cyberdrop_dl/ui/prompts/settings_user_prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,13 +357,22 @@ def edit_runtime_options_prompt(manager: Manager, config: Dict) -> None:
vi_mode=manager.vi_mode,
).execute()

log_level = inquirer.number(
message="Enter the desired UI refresh rate:",
default=int(config['Runtime_Options']['ui_refresh_rate']),
validate=NumberValidator(),
long_instruction="10 is the default",
vi_mode=manager.vi_mode,
).execute()

for key in config["Runtime_Options"]:
config["Runtime_Options"][key] = False

for key in action:
config["Runtime_Options"][key] = True

config['Runtime_Options']['log_level'] = int(log_level)
config['Runtime_Options']['ui_refresh_rate'] = int(log_level)


def edit_sort_options_prompt(manager: Manager, config: Dict) -> None:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cyberdrop-dl"
version = "5.2.46"
version = "5.2.47"
description = "Bulk downloader for multiple file hosts"
authors = ["Jules Winnfield <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit f11ba41

Please sign in to comment.