forked from Mirrors/RGSX
v2.2.0.7 - update batocera gamelist after download automatically (thanks to focalabroc for command, adapted)
This commit is contained in:
@@ -53,6 +53,7 @@ def get_system_root():
|
|||||||
# tester si c'est batocera :
|
# tester si c'est batocera :
|
||||||
if os.path.exists("/usr/share/batocera"):
|
if os.path.exists("/usr/share/batocera"):
|
||||||
OPERATING_SYSTEM = "Batocera"
|
OPERATING_SYSTEM = "Batocera"
|
||||||
|
|
||||||
#remonter jusqu'à atteindre /userdata
|
#remonter jusqu'à atteindre /userdata
|
||||||
current_path = os.path.abspath(__file__)
|
current_path = os.path.abspath(__file__)
|
||||||
current_dir = current_path
|
current_dir = current_path
|
||||||
@@ -132,6 +133,7 @@ if not HEADLESS:
|
|||||||
print(f"IMAGES_FOLDER: {IMAGES_FOLDER}")
|
print(f"IMAGES_FOLDER: {IMAGES_FOLDER}")
|
||||||
print(f"GAMES_FOLDER: {GAMES_FOLDER}")
|
print(f"GAMES_FOLDER: {GAMES_FOLDER}")
|
||||||
print(f"SOURCES_FILE: {SOURCES_FILE}")
|
print(f"SOURCES_FILE: {SOURCES_FILE}")
|
||||||
|
print(f"OPERATING_SYSTEM: {get_operating_system()}")
|
||||||
|
|
||||||
|
|
||||||
# Constantes pour la répétition automatique dans pause_menu
|
# Constantes pour la répétition automatique dans pause_menu
|
||||||
|
|||||||
@@ -613,6 +613,20 @@ async def download_rom(url, platform, game_name, is_zip_non_supported=False, tas
|
|||||||
break
|
break
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
# Exécuter la mise à jour de la liste des jeux d'EmulationStation UNIQUEMENT sur Batocera
|
||||||
|
try:
|
||||||
|
from config import get_operating_system
|
||||||
|
OPERATING_SYSTEM=get_operating_system()
|
||||||
|
if str(OPERATING_SYSTEM).lower() == "linux":
|
||||||
|
resp = requests.get("http://127.0.0.1:1234/reloadgames", timeout=2)
|
||||||
|
content = (resp.text or "").strip()
|
||||||
|
logger.debug(f"Résultat mise à jour liste des jeux: HTTP {resp.status_code} - {content}")
|
||||||
|
else:
|
||||||
|
logger.debug(f"Mise à jour liste des jeux ignorée (environnement non Linux: {getattr(config, 'OPERATING_SYSTEM', 'unknown')})")
|
||||||
|
except Exception as e:
|
||||||
|
logger.debug(f"Échec mise à jour via requête HTTP locale (Batocera): {e}")
|
||||||
|
|
||||||
# Nettoyer la queue
|
# Nettoyer la queue
|
||||||
if task_id in progress_queues:
|
if task_id in progress_queues:
|
||||||
del progress_queues[task_id]
|
del progress_queues[task_id]
|
||||||
|
|||||||
Reference in New Issue
Block a user