mirror of
https://github.com/rommapp/romm.git
synced 2026-02-18 00:27:41 +01:00
Formatted files
This commit is contained in:
@@ -369,9 +369,7 @@ class ConfigManager:
|
||||
)
|
||||
sys.exit(3)
|
||||
if not isinstance(self.config.GAMELIST_AUTO_EXPORT_ON_SCAN, bool):
|
||||
log.critical(
|
||||
"Invalid config.yml: scan.export_gamelist must be a boolean"
|
||||
)
|
||||
log.critical("Invalid config.yml: scan.export_gamelist must be a boolean")
|
||||
sys.exit(3)
|
||||
|
||||
if not isinstance(self.config.PLATFORMS_BINDING, dict):
|
||||
@@ -581,7 +579,6 @@ class ConfigManager:
|
||||
"media": self.config.SCAN_MEDIA,
|
||||
"export_gamelist": self.config.GAMELIST_AUTO_EXPORT_ON_SCAN,
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
try:
|
||||
|
||||
@@ -22,7 +22,6 @@ from exceptions.fs_exceptions import (
|
||||
RomsNotFoundException,
|
||||
)
|
||||
from exceptions.socket_exceptions import ScanStoppedException
|
||||
from utils.gamelist_exporter import GamelistExporter
|
||||
from handler.database import db_firmware_handler, db_platform_handler, db_rom_handler
|
||||
from handler.filesystem import (
|
||||
fs_firmware_handler,
|
||||
@@ -51,6 +50,7 @@ from models.rom import Rom, RomFile
|
||||
from tasks.tasks import update_job_meta
|
||||
from utils import emoji
|
||||
from utils.context import initialize_context
|
||||
from utils.gamelist_exporter import GamelistExporter
|
||||
|
||||
STOP_SCAN_FLAG: Final = "scan:stop"
|
||||
|
||||
@@ -690,7 +690,9 @@ async def scan_platforms(
|
||||
if config.GAMELIST_AUTO_EXPORT_ON_SCAN:
|
||||
log.info("Auto-exporting gamelist.xml for all platforms...")
|
||||
gamelist_exporter = GamelistExporter(local_export=True)
|
||||
platforms_by_slug = {p.fs_slug: p for p in db_platform_handler.get_platforms()}
|
||||
platforms_by_slug = {
|
||||
p.fs_slug: p for p in db_platform_handler.get_platforms()
|
||||
}
|
||||
for platform_slug in platform_list:
|
||||
platform = platforms_by_slug.get(platform_slug)
|
||||
if platform:
|
||||
@@ -707,7 +709,7 @@ async def scan_platforms(
|
||||
f"Failed to auto-export gamelist.xml for platform {platform.name} after scan"
|
||||
)
|
||||
log.info("Gamelist.xml auto-export completed.")
|
||||
|
||||
|
||||
await socket_manager.emit("scan:done", scan_stats.to_dict())
|
||||
except ScanStoppedException:
|
||||
await stop_scan()
|
||||
@@ -786,4 +788,4 @@ async def stop_scan_handler(_sid: str):
|
||||
):
|
||||
return await cancel_job(current_job)
|
||||
|
||||
log.info(f"{emoji.EMOJI_STOP_BUTTON} No running scan to stop")
|
||||
log.info(f"{emoji.EMOJI_STOP_BUTTON} No running scan to stop")
|
||||
|
||||
Reference in New Issue
Block a user