* moved call check_remote_hashes into module_parsing

Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
This commit is contained in:
2024-05-12 18:00:22 +07:00
parent bafcb26fbe
commit b9607db785
2 changed files with 9 additions and 11 deletions

View File

@@ -52,15 +52,15 @@ def check_remote_hashes():
return False
def update_configs(cfg_list):
"""
:param cfg_list: config list to update
"""
progress = QProgressDialog("Downloading configs...", None, 0, len(cfg_list), flags=Qt.Window | Qt.WindowTitleHint)
def update_configs():
update_list = check_remote_hashes()
if not update_list or len(update_list) == 0:
return
progress = QProgressDialog("Downloading configs...", None, 0, len(update_list), flags=Qt.Window | Qt.WindowTitleHint)
progress.setWindowTitle("Download progress")
progress.setWindowModality(Qt.WindowModal)
progress.show()
for cfg in cfg_list:
for cfg in update_list:
check_path(cfg)
response_status, response = get_response_result(github_link + cfg)
if response_status:
@@ -69,5 +69,5 @@ def update_configs(cfg_list):
dataIO.save_json(cfg, remote_cfg)
progress.setValue(progress.value()+1)
QApplication.processEvents()
progress.setValue(len(cfg_list))
progress.setValue(len(update_list))
QApplication.processEvents()