mirror of
https://github.com/rommapp/romm.git
synced 2026-06-28 23:06:11 +00:00
Merge branch 'master' into romm-2476
This commit is contained in:
@@ -737,25 +737,24 @@ async def update_rom(
|
||||
|
||||
cleaned_data.update(
|
||||
{
|
||||
"url_cover": "",
|
||||
"url_cover": f"http://local.internal/{path_cover_s}", # Fake url_cover to avoid overwriting
|
||||
"path_cover_s": path_cover_s,
|
||||
"path_cover_l": path_cover_l,
|
||||
}
|
||||
)
|
||||
else:
|
||||
if data.get(
|
||||
"url_cover", ""
|
||||
) != rom.url_cover or not fs_resource_handler.cover_exists(
|
||||
url_cover = data.get("url_cover", rom.url_cover)
|
||||
if url_cover != rom.url_cover or not fs_resource_handler.cover_exists(
|
||||
rom, CoverSize.BIG
|
||||
):
|
||||
path_cover_s, path_cover_l = await fs_resource_handler.get_cover(
|
||||
entity=rom,
|
||||
overwrite=True,
|
||||
url_cover=str(data.get("url_cover") or ""),
|
||||
url_cover=str(url_cover),
|
||||
)
|
||||
cleaned_data.update(
|
||||
{
|
||||
"url_cover": data.get("url_cover", rom.url_cover),
|
||||
"url_cover": url_cover,
|
||||
"path_cover_s": path_cover_s,
|
||||
"path_cover_l": path_cover_l,
|
||||
}
|
||||
|
||||
@@ -377,7 +377,7 @@ async def scan_rom(
|
||||
or (
|
||||
scan_type == ScanType.PARTIAL
|
||||
and not rom.hasheous_id
|
||||
and rom.slug in HASHEOUS_PLATFORM_LIST
|
||||
and rom.platform_slug in HASHEOUS_PLATFORM_LIST
|
||||
)
|
||||
or (scan_type == ScanType.UNIDENTIFIED and rom.is_unidentified)
|
||||
)
|
||||
@@ -422,7 +422,7 @@ async def scan_rom(
|
||||
or (
|
||||
scan_type == ScanType.PARTIAL
|
||||
and not rom.igdb_id
|
||||
and rom.slug in IGDB_PLATFORM_LIST
|
||||
and rom.platform_slug in IGDB_PLATFORM_LIST
|
||||
)
|
||||
or (scan_type == ScanType.UNIDENTIFIED and rom.is_unidentified)
|
||||
)
|
||||
@@ -501,7 +501,7 @@ async def scan_rom(
|
||||
or (
|
||||
scan_type == ScanType.PARTIAL
|
||||
and not rom.moby_id
|
||||
and rom.slug in MOBYGAMES_PLATFORM_LIST
|
||||
and rom.platform_slug in MOBYGAMES_PLATFORM_LIST
|
||||
)
|
||||
or (scan_type == ScanType.UNIDENTIFIED and rom.is_unidentified)
|
||||
)
|
||||
@@ -522,7 +522,7 @@ async def scan_rom(
|
||||
or (
|
||||
scan_type == ScanType.PARTIAL
|
||||
and not rom.ss_id
|
||||
and rom.slug in SCREENSAVER_PLATFORM_LIST
|
||||
and rom.platform_slug in SCREENSAVER_PLATFORM_LIST
|
||||
)
|
||||
or (scan_type == ScanType.UNIDENTIFIED and rom.is_unidentified)
|
||||
)
|
||||
@@ -540,7 +540,7 @@ async def scan_rom(
|
||||
or (
|
||||
scan_type == ScanType.PARTIAL
|
||||
and not rom.launchbox_id
|
||||
and rom.slug in LAUNCHBOX_PLATFORM_LIST
|
||||
and rom.platform_slug in LAUNCHBOX_PLATFORM_LIST
|
||||
)
|
||||
or (scan_type == ScanType.UNIDENTIFIED and rom.is_unidentified)
|
||||
):
|
||||
@@ -561,7 +561,7 @@ async def scan_rom(
|
||||
or (
|
||||
scan_type == ScanType.PARTIAL
|
||||
and not rom.ra_id
|
||||
and rom.slug in RA_PLATFORM_LIST
|
||||
and rom.platform_slug in RA_PLATFORM_LIST
|
||||
)
|
||||
or (scan_type == ScanType.UNIDENTIFIED and rom.is_unidentified)
|
||||
)
|
||||
@@ -590,7 +590,7 @@ async def scan_rom(
|
||||
or (
|
||||
scan_type == ScanType.PARTIAL
|
||||
and not rom.hasheous_id
|
||||
and rom.slug in HASHEOUS_PLATFORM_LIST
|
||||
and rom.platform_slug in HASHEOUS_PLATFORM_LIST
|
||||
)
|
||||
or (scan_type == ScanType.UNIDENTIFIED and rom.is_unidentified)
|
||||
)
|
||||
|
||||
@@ -259,8 +259,13 @@ async function updateRom({
|
||||
formData.append("name", rom.name || "");
|
||||
formData.append("fs_name", rom.fs_name);
|
||||
formData.append("summary", rom.summary || "");
|
||||
formData.append("url_cover", rom.url_cover || "");
|
||||
if (rom.artwork) formData.append("artwork", rom.artwork);
|
||||
|
||||
// Don't set url_cover on manual artwork upload
|
||||
if (rom.artwork) {
|
||||
formData.append("artwork", rom.artwork);
|
||||
} else {
|
||||
formData.append("url_cover", rom.url_cover || "");
|
||||
}
|
||||
|
||||
return api.put(`/roms/${rom.id}`, formData, {
|
||||
params: {
|
||||
|
||||
Reference in New Issue
Block a user