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

This commit is contained in:
Leon Styhre 2024-12-02 18:09:23 +01:00
parent bfba47dd1a
commit 955c7ae165

View file

@ -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));