mirror of
https://github.com/rommapp/romm.git
synced 2026-02-18 00:27:41 +01:00
Merge pull request #1744 from rommapp/romm-1742
[ROMM-1742] Fix updating cover when manual matching
This commit is contained in:
@@ -443,7 +443,7 @@ async def update_rom(
|
||||
request (Request): Fastapi Request object
|
||||
id (Rom): Rom internal id
|
||||
rename_as_source (bool, optional): Flag to rename rom file as matched IGDB game. Defaults to False.
|
||||
artwork (UploadFile, optional): Custom artork to set as cover. Defaults to File(None).
|
||||
artwork (UploadFile, optional): Custom artwork to set as cover. Defaults to File(None).
|
||||
unmatch_metadata: Remove the metadata matches for this game. Defaults to False.
|
||||
|
||||
Raises:
|
||||
|
||||
@@ -177,11 +177,7 @@ function selectCover(source: MatchedSource) {
|
||||
|
||||
function confirm() {
|
||||
if (!selectedMatchRom.value || !selectedCover.value) return;
|
||||
updateRom(
|
||||
Object.assign(selectedMatchRom.value, {
|
||||
url_cover: selectedCover.value.url_cover,
|
||||
}),
|
||||
);
|
||||
updateRom(selectedMatchRom.value, selectedCover.value.url_cover);
|
||||
closeDialog();
|
||||
}
|
||||
|
||||
@@ -197,7 +193,10 @@ function backToMatched() {
|
||||
renameAsSource.value = false;
|
||||
}
|
||||
|
||||
async function updateRom(selectedRom: SearchRomSchema) {
|
||||
async function updateRom(
|
||||
selectedRom: SearchRomSchema,
|
||||
urlCover: string | undefined,
|
||||
) {
|
||||
if (!rom.value) return;
|
||||
|
||||
show.value = false;
|
||||
@@ -213,9 +212,10 @@ async function updateRom(selectedRom: SearchRomSchema) {
|
||||
slug: selectedRom.slug,
|
||||
summary: selectedRom.summary,
|
||||
url_cover:
|
||||
selectedRom.moby_url_cover ||
|
||||
selectedRom.igdb_url_cover ||
|
||||
urlCover ||
|
||||
selectedRom.ss_url_cover ||
|
||||
selectedRom.igdb_url_cover ||
|
||||
selectedRom.moby_url_cover ||
|
||||
null,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user