mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 23:55:38 +00:00
Blank/unknown values can now be filtered for Genre, Player, Publisher/Developer and Alternative emulator.
This commit is contained in:
parent
c85700571d
commit
53630e3a7a
|
@ -13,6 +13,7 @@
|
|||
#include "Settings.h"
|
||||
#include "utils/StringUtil.h"
|
||||
#include "views/UIModeController.h"
|
||||
#include "views/ViewController.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
|
@ -222,9 +223,16 @@ std::string FileFilterIndex::getIndexableKey(FileData* game,
|
|||
break;
|
||||
}
|
||||
key = Utils::String::trim(key);
|
||||
if (key.empty() || (type == RATINGS_FILTER && key == "0 STARS")) {
|
||||
|
||||
// Add a dummy value in case there is no metadata defined so we can filter based on this.
|
||||
if ((type == GENRE_FILTER || type == PLAYER_FILTER || type == PUBDEV_FILTER) &&
|
||||
Utils::String::toUpper(key) == UNKNOWN_LABEL)
|
||||
key = ViewController::CROSSEDCIRCLE_CHAR + " UNKNOWN";
|
||||
else if (type == ALTEMULATOR_FILTER && key.empty())
|
||||
key = ViewController::CROSSEDCIRCLE_CHAR + " NONE DEFINED";
|
||||
else if (key.empty() || (type == RATINGS_FILTER && key == "0 STARS"))
|
||||
key = UNKNOWN_LABEL;
|
||||
}
|
||||
|
||||
return key;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue