mirror of
https://github.com/rommapp/romm.git
synced 2026-02-19 07:50:57 +01:00
fix manual matching
This commit is contained in:
@@ -62,10 +62,6 @@ emitter?.on("showMatchRomDialog", (romToSearch) => {
|
||||
romToSearch.igdb_id || romToSearch.moby_id || romToSearch.ss_id
|
||||
? (romToSearch.name ?? "")
|
||||
: romToSearch.fs_name_no_tags;
|
||||
|
||||
if (searchTerm.value) {
|
||||
searchRom();
|
||||
}
|
||||
});
|
||||
const missingCoverImage = computed(() =>
|
||||
getMissingCoverImage(rom.value?.name || rom.value?.fs_name || ""),
|
||||
@@ -207,7 +203,19 @@ async function updateRom(selectedRom: SearchRomSchema) {
|
||||
show.value = false;
|
||||
emitter?.emit("showLoadingDialog", { loading: true, scrim: true });
|
||||
|
||||
Object.assign(rom.value, selectedRom);
|
||||
// Set the properties from the selected rom
|
||||
rom.value = {
|
||||
...rom.value,
|
||||
igdb_id: selectedRom.igdb_id,
|
||||
moby_id: selectedRom.moby_id,
|
||||
ss_id: selectedRom.ss_id,
|
||||
name: selectedRom.name,
|
||||
slug: selectedRom.slug,
|
||||
summary: selectedRom.summary,
|
||||
url_cover: selectedRom.url_cover,
|
||||
};
|
||||
|
||||
// Replace the cover image with a higher resolution
|
||||
if (rom.value.url_cover) {
|
||||
rom.value.url_cover = rom.value.url_cover.replace("t_cover_big", "t_1080p");
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import storeGalleryFilter from "@/stores/galleryFilter";
|
||||
import { type Platform } from "@/stores/platforms";
|
||||
import type { ExtractPiniaStoreType } from "@/types";
|
||||
import { getStatusKeyForText } from "@/utils";
|
||||
import { groupBy, isNull, uniqBy } from "lodash";
|
||||
import { groupBy, isNull, isUndefined, uniqBy } from "lodash";
|
||||
import { nanoid } from "nanoid";
|
||||
import { defineStore } from "pinia";
|
||||
|
||||
@@ -372,7 +372,7 @@ export default defineStore("roms", {
|
||||
this.lastSelectedIndex = -1;
|
||||
},
|
||||
isSimpleRom(rom: SimpleRom | SearchRomSchema): rom is SimpleRom {
|
||||
return (rom as SimpleRom).id !== undefined;
|
||||
return !isNull(rom.id) && !isUndefined(rom.id);
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user