mirror of
https://github.com/RetroGameSets/RGSX.git
synced 2026-03-19 16:26:00 +01:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
486c9d0244 | ||
|
|
aed7da8b51 | ||
|
|
93fc4a023d |
@@ -13,7 +13,7 @@ except Exception:
|
||||
pygame = None # type: ignore
|
||||
|
||||
# Version actuelle de l'application
|
||||
app_version = "2.3.1.2"
|
||||
app_version = "2.3.1.3"
|
||||
|
||||
|
||||
def get_application_root():
|
||||
|
||||
@@ -455,10 +455,15 @@ async def check_for_updates():
|
||||
|
||||
response = requests.get(OTA_VERSION_ENDPOINT, timeout=5)
|
||||
response.raise_for_status()
|
||||
if response.headers.get("content-type") != "application/json":
|
||||
|
||||
# Accepter différents content-types (application/json, text/plain, text/html)
|
||||
content_type = response.headers.get("content-type", "")
|
||||
allowed_types = ["application/json", "text/plain", "text/html"]
|
||||
if not any(allowed in content_type for allowed in allowed_types):
|
||||
raise ValueError(
|
||||
f"Le fichier version.json n'est pas un JSON valide (type de contenu : {response.headers.get('content-type')})"
|
||||
f"Le fichier version.json n'est pas un JSON valide (type de contenu : {content_type})"
|
||||
)
|
||||
|
||||
version_data = response.json()
|
||||
latest_version = version_data.get("version")
|
||||
logger.debug(f"Version distante : {latest_version}, version locale : {config.app_version}")
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"version": "2.3.1.2"
|
||||
"version": "2.3.1.3"
|
||||
}
|
||||
Reference in New Issue
Block a user