All checks were successful
Build and Upload Release (Windows EXE) / Build Windows EXE (release) Successful in 34s
47 lines
1.3 KiB
Python
47 lines
1.3 KiB
Python
"""
|
|
Configuration settings for the update checker
|
|
"""
|
|
|
|
# Update checker configuration
|
|
UPDATE_CONFIG = {
|
|
# Current version of the application
|
|
"current_version": "0.0.2",
|
|
|
|
# Repository information
|
|
"repo_owner": "HRiggs",
|
|
"repo_name": "ProgressionMods",
|
|
"api_base_url": "https://git.hudsonriggs.systems/api/v1",
|
|
|
|
# Update check frequency (in hours) - set to 0 to check every startup
|
|
"check_interval_hours": 0,
|
|
|
|
# Whether to check for updates on startup
|
|
"check_on_startup": True,
|
|
|
|
# Delay before checking for updates on startup (in milliseconds)
|
|
"startup_check_delay": 5000,
|
|
|
|
# Whether to include pre-releases in update checks
|
|
"include_prereleases": True,
|
|
|
|
# User agent string for API requests
|
|
"user_agent": "ProgressionLoader-UpdateChecker/1.0",
|
|
|
|
# Request timeout in seconds
|
|
"request_timeout": 10,
|
|
|
|
# File to store last check time and skipped versions (set to None to disable persistence)
|
|
"last_check_file": None
|
|
}
|
|
|
|
def get_update_config():
|
|
"""Get the update configuration"""
|
|
return UPDATE_CONFIG.copy()
|
|
|
|
def set_current_version(version):
|
|
"""Set the current version"""
|
|
UPDATE_CONFIG["current_version"] = version
|
|
|
|
def get_current_version():
|
|
"""Get the current version"""
|
|
return UPDATE_CONFIG["current_version"] |