From 93ea691b295515e34886a093d2f680ef95ef9f4f Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Fri, 3 Oct 2025 00:20:06 -0500 Subject: [PATCH] Update --- frogpilot/assets/download_functions.py | 2 +- frogpilot/assets/theme_manager.py | 16 ++++++++-------- frogpilot/common/frogpilot_variables.py | 2 -- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/frogpilot/assets/download_functions.py b/frogpilot/assets/download_functions.py index b93a7c68e..ac1b28962 100644 --- a/frogpilot/assets/download_functions.py +++ b/frogpilot/assets/download_functions.py @@ -88,7 +88,7 @@ def handle_error(destination, error_message, error, download_param, progress_par if destination: delete_file(destination) - if progress_param and "404" not in error_message: + if params_memory and progress_param and "404" not in error_message: print(f"Error occurred: {error}") params_memory.put(progress_param, error_message) params_memory.remove(download_param) diff --git a/frogpilot/assets/theme_manager.py b/frogpilot/assets/theme_manager.py index edce598a0..50ba3c22b 100644 --- a/frogpilot/assets/theme_manager.py +++ b/frogpilot/assets/theme_manager.py @@ -98,7 +98,7 @@ class ThemeManager: repo_url = get_repository_url() if not repo_url: - handle_error(None, "GitHub and GitLab are offline...", "Repository unavailable", asset_param, DOWNLOAD_PROGRESS_PARAM) + handle_error(None, "GitHub and GitLab are offline...", "Repository unavailable", asset_param, DOWNLOAD_PROGRESS_PARAM, params_memory) self.downloading_theme = False return @@ -122,16 +122,16 @@ class ThemeManager: delete_file(theme_path) print(f"Downloading theme from GitHub: {theme_name}") - download_file(CANCEL_DOWNLOAD_PARAM, theme_path, DOWNLOAD_PROGRESS_PARAM, theme_url, asset_param, self.session) + download_file(CANCEL_DOWNLOAD_PARAM, theme_path, DOWNLOAD_PROGRESS_PARAM, theme_url, asset_param, params_memory) if params_memory.get_bool(CANCEL_DOWNLOAD_PARAM): delete_file(theme_path) - handle_error(None, "Download cancelled...", "Download cancelled...", asset_param, DOWNLOAD_PROGRESS_PARAM) + handle_error(None, "Download cancelled...", "Download cancelled...", asset_param, DOWNLOAD_PROGRESS_PARAM, params_memory) self.downloading_theme = False return - if verify_download(theme_path, theme_url, self.session): + if verify_download(theme_path, theme_url): print(f"Theme {theme_name} downloaded and verified successfully from GitHub!") self.update_theme_size(theme_component, theme_name, theme_path.stat().st_size) @@ -149,7 +149,7 @@ class ThemeManager: elif self.handle_verification_failure(extension, theme_component, theme_name, asset_param, theme_path, download_path, frogpilot_toggles): return - handle_error(download_path, "Download failed...", "Download failed...", asset_param, DOWNLOAD_PROGRESS_PARAM) + handle_error(download_path, "Download failed...", "Download failed...", asset_param, DOWNLOAD_PROGRESS_PARAM, params_memory) self.downloading_theme = False def fetch_assets(self, repo_url, frogpilot_toggles): @@ -332,9 +332,9 @@ class ThemeManager: theme_url = download_link + extension print(f"Downloading theme from GitLab: {theme_name}") - download_file(CANCEL_DOWNLOAD_PARAM, theme_path, DOWNLOAD_PROGRESS_PARAM, theme_url, asset_param, self.session) + download_file(CANCEL_DOWNLOAD_PARAM, theme_path, DOWNLOAD_PROGRESS_PARAM, theme_url, asset_param, params_memory) - if verify_download(theme_path, theme_url, self.session): + if verify_download(theme_path, theme_url): print(f"Theme {theme_name} downloaded and verified successfully from GitLab!") self.update_theme_size(theme_component, theme_name, theme_path.stat().st_size) @@ -350,7 +350,7 @@ class ThemeManager: self.update_themes(frogpilot_toggles) return True - handle_error(None, "Download failed...", "Download failed...", asset_param, DOWNLOAD_PROGRESS_PARAM) + handle_error(None, "Download failed...", "Download failed...", asset_param, DOWNLOAD_PROGRESS_PARAM, params_memory) self.downloading_theme = False return False diff --git a/frogpilot/common/frogpilot_variables.py b/frogpilot/common/frogpilot_variables.py index 827706e1c..e37e99633 100644 --- a/frogpilot/common/frogpilot_variables.py +++ b/frogpilot/common/frogpilot_variables.py @@ -29,8 +29,6 @@ params = Params() params_cache = Params("/cache/params") params_default = Params("/dev/shm/params_default") params_memory = Params("/dev/shm/params") -params_tracking = Params("/cache/tracking") -params_tracking = Params("/cache/tracking") GearShifter = car.CarState.GearShifter SafetyModel = car.CarParams.SafetyModel