mirror of
https://github.com/rommapp/romm.git
synced 2026-02-18 23:42:07 +01:00
Only update specific values on models during scan
This commit is contained in:
@@ -85,8 +85,8 @@ async def add_collection(
|
||||
created_collection = db_collection_handler.update_collection(
|
||||
_added_collection.id,
|
||||
{
|
||||
c: getattr(_added_collection, c)
|
||||
for c in inspect(_added_collection).mapper.column_attrs.keys()
|
||||
"path_cover_s": path_cover_s,
|
||||
"path_cover_l": path_cover_l,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
@@ -288,12 +288,15 @@ async def _identify_rom(
|
||||
_added_rom.path_cover_l = path_cover_l
|
||||
_added_rom.path_screenshots = path_screenshots
|
||||
_added_rom.path_manual = path_manual
|
||||
|
||||
# Update the scanned rom with the cover and screenshots paths and update database
|
||||
db_rom_handler.update_rom(
|
||||
_added_rom.id,
|
||||
{
|
||||
c: getattr(_added_rom, c)
|
||||
for c in inspect(_added_rom).mapper.column_attrs.keys()
|
||||
"path_cover_s": path_cover_s,
|
||||
"path_cover_l": path_cover_l,
|
||||
"path_screenshots": path_screenshots,
|
||||
"path_manual": path_manual,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user