mirror of
https://github.com/rommapp/romm.git
synced 2026-11-30 02:22:44 +01:00
Merge pull request #1177 from rommapp/fix/use-filename-when-matching-unmatched-rom
fix: Use filename without tags or extension when matching unmatched game
This commit is contained in:
@@ -39,9 +39,16 @@ const isIGDBFiltered = ref(true);
|
||||
const isMobyFiltered = ref(true);
|
||||
emitter?.on("showMatchRomDialog", (romToSearch) => {
|
||||
rom.value = romToSearch;
|
||||
searchTerm.value = romToSearch.name || romToSearch.file_name_no_tags || "";
|
||||
show.value = true;
|
||||
if (rom.value.igdb_id || rom.value.moby_id) {
|
||||
|
||||
// Use name as search term, only when it's matched
|
||||
// Otherwise use the filename without tags and extensions
|
||||
searchTerm.value =
|
||||
romToSearch.igdb_id || romToSearch.moby_id
|
||||
? (romToSearch.name ?? "")
|
||||
: romToSearch.file_name_no_tags;
|
||||
|
||||
if (searchTerm.value) {
|
||||
searchRom();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user