Skip to content

Commit 4eb86ab

Browse files
committed
set overwrite to true on scan
1 parent adbac5a commit 4eb86ab

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

backend/endpoints/sockets/scan.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -275,10 +275,10 @@ async def _identify_rom(
275275
return
276276

277277
# Build rom files object before scanning
278-
should_update_props = _should_get_rom_files(
278+
should_update_files = _should_get_rom_files(
279279
scan_type=scan_type, rom=rom, newly_added=newly_added, roms_ids=roms_ids
280280
)
281-
if should_update_props:
281+
if should_update_files:
282282
log.debug(f"Calculating file hashes for {rom.fs_name}...")
283283
rom_files, rom_crc_c, rom_md5_h, rom_sha1_h, rom_ra_h = (
284284
await fs_rom_handler.get_rom_files(rom)
@@ -321,7 +321,7 @@ async def _identify_rom(
321321
),
322322
)
323323

324-
if should_update_props:
324+
if should_update_files:
325325
# Delete the existing rom files in the DB
326326
db_rom_handler.purge_rom_files(_added_rom.id)
327327

@@ -350,19 +350,19 @@ async def _identify_rom(
350350

351351
path_cover_s, path_cover_l = await fs_resource_handler.get_cover(
352352
entity=_added_rom,
353-
overwrite=should_update_props,
353+
overwrite=True,
354354
url_cover=_added_rom.url_cover,
355355
)
356356

357357
path_manual = await fs_resource_handler.get_manual(
358358
rom=_added_rom,
359-
overwrite=should_update_props,
359+
overwrite=True,
360360
url_manual=_added_rom.url_manual,
361361
)
362362

363363
path_screenshots = await fs_resource_handler.get_rom_screenshots(
364364
rom=_added_rom,
365-
overwrite=should_update_props,
365+
overwrite=True,
366366
url_screenshots=_added_rom.url_screenshots,
367367
)
368368

0 commit comments

Comments
 (0)