From eaf0434e19a185e1bab03a7c004cfcbba3447a69 Mon Sep 17 00:00:00 2001 From: DYefremov Date: Wed, 4 May 2022 20:49:33 +0300 Subject: [PATCH] added compress picons option --- app/connections.py | 2 +- app/settings.py | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/connections.py b/app/connections.py index 10b74bd0..0b93ebd6 100644 --- a/app/connections.py +++ b/app/connections.py @@ -471,7 +471,7 @@ def upload_data(*, settings, download_type=DownloadType.ALL, remove_unused=False if download_type is DownloadType.PICONS: p_src, p_dst = settings.profile_picons_path, settings.picons_path - compress = files_filter and len(files_filter) > PICONS_MAX_NUM + compress = all((settings.compress_picons, files_filter, len(files_filter) > PICONS_MAX_NUM)) if compress: from zipfile import ZipFile diff --git a/app/settings.py b/app/settings.py index 7a18c524..c834cb10 100644 --- a/app/settings.py +++ b/app/settings.py @@ -757,7 +757,7 @@ class Settings: def is_darwin(self): return IS_DARWIN - # *********** Download dialog *********** # + # ************* Download ************** # @property def use_http(self): @@ -775,6 +775,14 @@ class Settings: def remove_unused_bouquets(self, value): self._settings["remove_unused_bouquets"] = value + @property + def compress_picons(self): + return self._settings.get("compress_picons", False) + + @compress_picons.setter + def compress_picons(self, value): + self._settings["compress_picons"] = value + # **************** Debug **************** # @property