forked from Mirrors/RGSX
correction bug update
This commit is contained in:
@@ -4,7 +4,7 @@ import sys
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
# Version actuelle de l'application
|
# Version actuelle de l'application
|
||||||
app_version = "1.9.8.8."
|
app_version = "1.9.8.8"
|
||||||
|
|
||||||
def get_application_root():
|
def get_application_root():
|
||||||
"""Détermine le dossier de l'application de manière portable."""
|
"""Détermine le dossier de l'application de manière portable."""
|
||||||
@@ -54,7 +54,7 @@ logger = logging.getLogger(__name__)
|
|||||||
log_dir = os.path.join(APP_FOLDER, "logs")
|
log_dir = os.path.join(APP_FOLDER, "logs")
|
||||||
log_file = os.path.join(log_dir, "RGSX.log")
|
log_file = os.path.join(log_dir, "RGSX.log")
|
||||||
|
|
||||||
# Chemins de base
|
# Chemins (suite)
|
||||||
UPDATE_FOLDER = os.path.join(APP_FOLDER, "update")
|
UPDATE_FOLDER = os.path.join(APP_FOLDER, "update")
|
||||||
GAMELISTXML = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(APP_FOLDER))), "roms", "ports", "gamelist.xml")
|
GAMELISTXML = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(APP_FOLDER))), "roms", "ports", "gamelist.xml")
|
||||||
IMAGES_FOLDER = os.path.join(APP_FOLDER, "images", "systemes")
|
IMAGES_FOLDER = os.path.join(APP_FOLDER, "images", "systemes")
|
||||||
@@ -64,6 +64,7 @@ HISTORY_PATH = os.path.join(SAVE_FOLDER, "history.json")
|
|||||||
LANGUAGE_CONFIG_PATH = os.path.join(SAVE_FOLDER, "language.json")
|
LANGUAGE_CONFIG_PATH = os.path.join(SAVE_FOLDER, "language.json")
|
||||||
JSON_EXTENSIONS = os.path.join(APP_FOLDER, "rom_extensions.json")
|
JSON_EXTENSIONS = os.path.join(APP_FOLDER, "rom_extensions.json")
|
||||||
MUSIC_CONFIG_PATH = os.path.join(SAVE_FOLDER, "music_config.json")
|
MUSIC_CONFIG_PATH = os.path.join(SAVE_FOLDER, "music_config.json")
|
||||||
|
SYMLINK_SETTINGS_PATH = os.path.join(SAVE_FOLDER, "symlink_settings.json")
|
||||||
UNRAR_EXE = os.path.join(APP_FOLDER,"assets", "unrar.exe")
|
UNRAR_EXE = os.path.join(APP_FOLDER,"assets", "unrar.exe")
|
||||||
XDVDFS_EXE = os.path.join(APP_FOLDER,"assets", "xdvdfs.exe")
|
XDVDFS_EXE = os.path.join(APP_FOLDER,"assets", "xdvdfs.exe")
|
||||||
XDVDFS_LINUX = os.path.join(APP_FOLDER,"assets", "xdvdfs")
|
XDVDFS_LINUX = os.path.join(APP_FOLDER,"assets", "xdvdfs")
|
||||||
|
|||||||
@@ -7,13 +7,13 @@ from language import _
|
|||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
# Path for symlink settings
|
# Path for symlink settings
|
||||||
SYMLINK_SETTINGS_PATH = os.path.join(config.SAVE_FOLDER, "symlink_settings.json")
|
|
||||||
|
|
||||||
def load_symlink_settings():
|
def load_symlink_settings():
|
||||||
"""Load symlink settings from file."""
|
"""Load symlink settings from file."""
|
||||||
try:
|
try:
|
||||||
if os.path.exists(SYMLINK_SETTINGS_PATH):
|
if os.path.exists(config.SYMLINK_SETTINGS_PATH):
|
||||||
with open(SYMLINK_SETTINGS_PATH, 'r', encoding='utf-8') as f:
|
with open(config.SYMLINK_SETTINGS_PATH, 'r', encoding='utf-8') as f:
|
||||||
settings = json.load(f)
|
settings = json.load(f)
|
||||||
if not isinstance(settings, dict):
|
if not isinstance(settings, dict):
|
||||||
settings = {}
|
settings = {}
|
||||||
@@ -30,7 +30,7 @@ def save_symlink_settings(settings):
|
|||||||
"""Save symlink settings to file."""
|
"""Save symlink settings to file."""
|
||||||
try:
|
try:
|
||||||
os.makedirs(config.SAVE_FOLDER, exist_ok=True)
|
os.makedirs(config.SAVE_FOLDER, exist_ok=True)
|
||||||
with open(SYMLINK_SETTINGS_PATH, 'w', encoding='utf-8') as f:
|
with open(config.SYMLINK_SETTINGS_PATH, 'w', encoding='utf-8') as f:
|
||||||
json.dump(settings, f, indent=2)
|
json.dump(settings, f, indent=2)
|
||||||
logger.debug(f"Symlink settings saved: {settings}")
|
logger.debug(f"Symlink settings saved: {settings}")
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in New Issue
Block a user