added compress picons option

This commit is contained in:
DYefremov
2022-05-04 20:49:33 +03:00
parent 079cf6a482
commit eaf0434e19
2 changed files with 10 additions and 2 deletions

View File

@@ -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

View File

@@ -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