From 04419383aa2eea6f570422c1dd82e249108dea18 Mon Sep 17 00:00:00 2001 From: Michael Green <84688932+michael-j-green@users.noreply.github.com> Date: Tue, 12 Mar 2024 00:42:59 +1100 Subject: [PATCH] When fixing matches, search doesn't return the correct values (#330) Issue was due to the search result limit being too low. Increased the search result size to 100 returned objects. --- .../Controllers/V1.0/SearchController.cs | 1 + gaseous-server/wwwroot/pages/dialogs/rominfo.html | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/gaseous-server/Controllers/V1.0/SearchController.cs b/gaseous-server/Controllers/V1.0/SearchController.cs index a476688..3589410 100644 --- a/gaseous-server/Controllers/V1.0/SearchController.cs +++ b/gaseous-server/Controllers/V1.0/SearchController.cs @@ -76,6 +76,7 @@ namespace gaseous_server.Controllers string searchFields = "fields cover,first_release_date,name,platforms,slug; "; searchBody += "search \"" + SearchString + "\";"; searchBody += "where platforms = (" + PlatformId + ");"; + searchBody += "limit 100;"; List? searchCache = Communications.GetSearchCache>(searchFields, searchBody); diff --git a/gaseous-server/wwwroot/pages/dialogs/rominfo.html b/gaseous-server/wwwroot/pages/dialogs/rominfo.html index c79928f..b5ce6e2 100644 --- a/gaseous-server/wwwroot/pages/dialogs/rominfo.html +++ b/gaseous-server/wwwroot/pages/dialogs/rominfo.html @@ -78,7 +78,7 @@ - + @@ -252,6 +252,7 @@ var fixplatform = $('#properties_fixplatform').select2('data'); var fixgame = $('#properties_fixgame').select2('data'); + document.getElementById('properties_fixclear').setAttribute("disabled", "disabled"); document.getElementById('properties_fixsave').setAttribute("disabled", "disabled"); ajaxCall('/api/v1.1/Games/' + gameId + '/roms/' + modalVariables + '?NewPlatformId=' + fixplatform[0].id + '&NewGameId=' + fixgame[0].id, 'PATCH', function (result) { @@ -259,6 +260,18 @@ }); } + function ClearFixedGame() { + var fixplatform = 0; + var fixgame = 0; + + document.getElementById('properties_fixclear').setAttribute("disabled", "disabled"); + document.getElementById('properties_fixsave').setAttribute("disabled", "disabled"); + + ajaxCall('/api/v1.1/Games/' + gameId + '/roms/' + modalVariables + '?NewPlatformId=' + fixplatform + '&NewGameId=' + fixgame, 'PATCH', function (result) { + window.location.reload(); + }); + } + function BuildAttributesTable(attributes, sourceName) { var aTable = document.createElement('table'); aTable.style.width = '100%';