From 955c7ae165b51c73aea0666bfdb49afddba6939c Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Mon, 2 Dec 2024 18:09:23 +0100 Subject: [PATCH] Fixed an issue where some metadata values were sometimes not saved by the single-game scraper if overwriting was disabled and the language was not set to English --- es-app/src/guis/GuiScraperSearch.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/es-app/src/guis/GuiScraperSearch.cpp b/es-app/src/guis/GuiScraperSearch.cpp index 1b7d14c00..cccb5199d 100644 --- a/es-app/src/guis/GuiScraperSearch.cpp +++ b/es-app/src/guis/GuiScraperSearch.cpp @@ -1133,6 +1133,12 @@ bool GuiScraperSearch::saveMetadata(const ScraperSearchResult& result, metadata.set(key, result.mdl.get(key)); metadataUpdated = true; } + // We need to check against a translated "unknown" for keys that have this default value. + else if ((key == "developer" || key == "publisher" || key == "genre" || key == "players") && + metadata.get(key) == _("unknown")) { + metadata.set(key, result.mdl.get(key)); + metadataUpdated = true; + } // Else only update the value if it is set to the default metadata value. else if (metadata.get(key) == mMetaDataDecl.at(i).defaultValue) { metadata.set(key, result.mdl.get(key));