Check for update set to once a week, making asciinema demo.
This commit is contained in:
parent
f11c844489
commit
32cbd1b88c
1 changed files with 4 additions and 4 deletions
|
@ -3,7 +3,7 @@ import time
|
|||
import sys
|
||||
from datetime import datetime
|
||||
|
||||
version = "0.5.3" # actully 0.5.2 because 0.5.1 was just pushed
|
||||
version = "0.5.4"
|
||||
gitlab_url = "https://gitlab.com/python_projects3802849/ftl-save-manager/-/raw/main"
|
||||
settings_location = "settings.txt"
|
||||
dependencies = ("simple_term_menu", "requests")
|
||||
|
@ -316,7 +316,7 @@ class SettingManager:
|
|||
|
||||
def set_default_values(self, repo_url):
|
||||
default_values = {"REPO_URL": repo_url,
|
||||
"AUTO_UPDATE_CHECK_INTERVAL_H": "72"
|
||||
"AUTO_UPDATE_CHECK_INTERVAL_H": "168" # checks once a week
|
||||
}
|
||||
for key in default_values:
|
||||
if key not in self.settings:
|
||||
|
@ -326,7 +326,7 @@ class SettingManager:
|
|||
|
||||
def convert_str_to_int_settings(self):
|
||||
"""Change str to int for a given keys in the settings, if not convertable then replace with default value"""
|
||||
int_values = {"AUTO_UPDATE_CHECK_INTERVAL_H": 72} # Dict for all variables which sould be intinger, and their default values. Scable for future
|
||||
int_values = {"AUTO_UPDATE_CHECK_INTERVAL_H": 168} # Dict for all variables which sould be intinger, and their default values. Scable for future
|
||||
for key in int_values:
|
||||
try:
|
||||
self.settings[key] = int(self.settings[key])
|
||||
|
@ -434,7 +434,7 @@ class Utility():
|
|||
print(f"File to copy {src} does not exist.")
|
||||
return False
|
||||
os.system(f"cp {src} {dst}")
|
||||
print(f"Wrote: {dst}")
|
||||
#print(f"Wrote: {dst}")
|
||||
|
||||
@staticmethod
|
||||
def copy_file_overwrite_if_newer(source, destination):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue