Compare commits

..

5 Commits

Author SHA1 Message Date
skymike03
486c9d0244 v2.3.1.3
- new update json file
2025-11-02 00:04:52 +01:00
skymike03
aed7da8b51 v2.3.1.3
- new update json file
2025-11-02 00:04:27 +01:00
skymike03
93fc4a023d v2.3.1.2.1
- Update application version to  and change OTA version endpoint URL
2025-11-01 23:42:33 +01:00
skymike03
b4398b1d82 v2.3.1.2
- corrrect version check link
2025-11-01 23:24:20 +01:00
skymike03
751800026c v2.3.1.2
- corrrect version check link
2025-11-01 23:23:59 +01:00
3 changed files with 10 additions and 5 deletions

View File

@@ -13,7 +13,7 @@ except Exception:
pygame = None # type: ignore
# Version actuelle de l'application
app_version = "2.3.1.1"
app_version = "2.3.1.3"
def get_application_root():
@@ -98,7 +98,7 @@ GITHUB_RELEASES_URL = f"https://github.com/{GITHUB_REPO}/releases"
# URLs pour les mises à jour OTA (Over-The-Air)
# Utilise le fichier RGSX_latest.zip qui pointe toujours vers la dernière version
OTA_UPDATE_ZIP = f"{GITHUB_RELEASES_URL}/latest/download/RGSX_update_latest.zip"
OTA_VERSION_ENDPOINT = "https://github.com/RetroGameSets/RGSX/blob/main/version.json" # Endpoint pour vérifier la version disponible
OTA_VERSION_ENDPOINT = "https://raw.githubusercontent.com/RetroGameSets/RGSX/refs/heads/main/version.json" # Endpoint pour vérifier la version disponible
# URLs legacy (conservées pour compatibilité)
OTA_SERVER_URL = "https://retrogamesets.fr/softs/"

View File

@@ -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}")

View File

@@ -1,3 +1,3 @@
{
"version": "2.3.1.1"
"version": "2.3.1.3"
}