mirror of
https://github.com/rommapp/romm.git
synced 2026-11-30 02:22:44 +01:00
refactor(scan): ask the handler whether a rom is a folder
`directory_exists` and `Rom.full_path` already spell out the check the scan does at its own call site, so the path is no longer rebuilt here. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -11,8 +11,6 @@ from dataclasses import dataclass, field
|
||||
from pathlib import Path
|
||||
from typing import Any, Final, NotRequired, TypedDict
|
||||
|
||||
from anyio import Path as AnyioPath
|
||||
|
||||
from adapters.services.sigil import (
|
||||
SIGIL_PLATFORM_SLUGS,
|
||||
SWITCH_PLATFORM_SLUGS,
|
||||
@@ -600,7 +598,7 @@ class FSRomsHandler(FSHandler):
|
||||
# non-hashable platforms like Switch.
|
||||
sigil_platform = extract_title_ids and rom.platform_slug in SIGIL_PLATFORM_SLUGS
|
||||
is_switch = rom.platform_slug in SWITCH_PLATFORM_SLUGS
|
||||
is_multi_part = await AnyioPath(f"{abs_fs_path}/{rom.fs_name}").is_dir()
|
||||
is_multi_part = await self.directory_exists(rom.full_path)
|
||||
sigil_extractions: list[SigilExtractionResult] = []
|
||||
embed_candidates: list[TitleIdEmbedCandidate] = []
|
||||
title_id_sources: list[_TitleIdSource] = []
|
||||
|
||||
Reference in New Issue
Block a user