mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 23:55:38 +00:00
Added metadata setting to hide metadata fields from the gamelist view.
This commit is contained in:
parent
3ca9f5478a
commit
bd57d23bce
4
NEWS.md
4
NEWS.md
|
@ -1,5 +1,4 @@
|
||||||
EmulationStation Desktop Edition v1.0.0
|
# EmulationStation Desktop Edition v1.0.0
|
||||||
=======================================
|
|
||||||
|
|
||||||
**Release date:** YYYY-MM-DD
|
**Release date:** YYYY-MM-DD
|
||||||
|
|
||||||
|
@ -43,6 +42,7 @@ Many bugs have been fixed, and numerous features that were only partially implem
|
||||||
* Speed improvements and optimizations, the application now starts faster and feels more responsive
|
* Speed improvements and optimizations, the application now starts faster and feels more responsive
|
||||||
* Added metadata entry to mark games as broken/not working
|
* Added metadata entry to mark games as broken/not working
|
||||||
* Added metadata entry to indicate whether the file should be counted as a game (for example useful to exclude setup files and similar for DOS games)
|
* Added metadata entry to indicate whether the file should be counted as a game (for example useful to exclude setup files and similar for DOS games)
|
||||||
|
* Added metadata entry to hide the metadata values from the gamelist views (useful for general folders, DOS game configuration utilities etc.)
|
||||||
* Added a button to the metadata editor to delete the media files for a game or folder while retaining the game file and gamelist.xml entry
|
* Added a button to the metadata editor to delete the media files for a game or folder while retaining the game file and gamelist.xml entry
|
||||||
* Moved all resources to a subdirectory structure and enabled the CMake install prefix variable to generate the resources search path
|
* Moved all resources to a subdirectory structure and enabled the CMake install prefix variable to generate the resources search path
|
||||||
* Changed theme directory to the install prefix (e.g. /usr/local/share/emulationstation/themes) with themes in the home directory taking precedence
|
* Changed theme directory to the install prefix (e.g. /usr/local/share/emulationstation/themes) with themes in the home directory taking precedence
|
||||||
|
|
|
@ -29,12 +29,13 @@ MetaDataDecl gameDecls[] = {
|
||||||
{"broken", MD_BOOL, "false", false, "broken/not working", "enter broken off/on", false},
|
{"broken", MD_BOOL, "false", false, "broken/not working", "enter broken off/on", false},
|
||||||
{"nogamecount", MD_BOOL, "false", false, "exclude from game counter", "enter don't count as game off/on", false},
|
{"nogamecount", MD_BOOL, "false", false, "exclude from game counter", "enter don't count as game off/on", false},
|
||||||
{"nomultiscrape", MD_BOOL, "false", false, "exclude from multi-scraper", "enter no multi-scrape off/on", false},
|
{"nomultiscrape", MD_BOOL, "false", false, "exclude from multi-scraper", "enter no multi-scrape off/on", false},
|
||||||
|
{"hidemetadata", MD_BOOL, "false", false, "hide metadata fields", "enter hide metadata off/on", false},
|
||||||
{"launchcommand", MD_LAUNCHCOMMAND, "", false, "launch command", "enter game launch command "
|
{"launchcommand", MD_LAUNCHCOMMAND, "", false, "launch command", "enter game launch command "
|
||||||
"(emulator override)", false},
|
"(emulator override)", false},
|
||||||
{"playcount", MD_INT, "0", false, "play count", "enter number of times played", false},
|
{"playcount", MD_INT, "0", false, "play count", "enter number of times played", false},
|
||||||
{"lastplayed", MD_TIME, "0", true, "last played", "enter last played date", false}
|
{"lastplayed", MD_TIME, "0", true, "last played", "enter last played date", false}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const std::vector<MetaDataDecl> gameMDD(gameDecls, gameDecls +
|
const std::vector<MetaDataDecl> gameMDD(gameDecls, gameDecls +
|
||||||
sizeof(gameDecls) / sizeof(gameDecls[0]));
|
sizeof(gameDecls) / sizeof(gameDecls[0]));
|
||||||
|
|
||||||
|
@ -52,8 +53,10 @@ MetaDataDecl folderDecls[] = {
|
||||||
{"hidden", MD_BOOL, "false", false, "hidden", "enter hidden off/on", false},
|
{"hidden", MD_BOOL, "false", false, "hidden", "enter hidden off/on", false},
|
||||||
{"broken", MD_BOOL, "false", false, "broken/not working", "enter broken off/on", false},
|
{"broken", MD_BOOL, "false", false, "broken/not working", "enter broken off/on", false},
|
||||||
{"nomultiscrape", MD_BOOL, "false", false, "exclude from multi-scraper", "enter no multi-scrape off/on", false},
|
{"nomultiscrape", MD_BOOL, "false", false, "exclude from multi-scraper", "enter no multi-scrape off/on", false},
|
||||||
|
{"hidemetadata", MD_BOOL, "false", false, "hide metadata fields", "enter hide metadata off/on", false},
|
||||||
{"lastplayed", MD_TIME, "0", true, "last played", "enter last played date", false}
|
{"lastplayed", MD_TIME, "0", true, "last played", "enter last played date", false}
|
||||||
};
|
};
|
||||||
|
|
||||||
const std::vector<MetaDataDecl> folderMDD(folderDecls, folderDecls +
|
const std::vector<MetaDataDecl> folderMDD(folderDecls, folderDecls +
|
||||||
sizeof(folderDecls) / sizeof(folderDecls[0]));
|
sizeof(folderDecls) / sizeof(folderDecls[0]));
|
||||||
|
|
||||||
|
|
|
@ -427,11 +427,8 @@ void GuiMetaDataEd::fetchDone(const ScraperSearchResult& result)
|
||||||
else
|
else
|
||||||
mEditors.at(i)->setColor(TEXTCOLOR_SCRAPERMARKED);
|
mEditors.at(i)->setColor(TEXTCOLOR_SCRAPERMARKED);
|
||||||
}
|
}
|
||||||
// Save all the keys, except the following which can't be scraped.
|
// Save all the keys that should be scraped.
|
||||||
if (key != "favorite" && key != "completed" && key != "kidgame" &&
|
if (mMetaDataDecl.at(i).shouldScrape)
|
||||||
key != "hidden" && key != "broken" && key != "nogamecount" &&
|
|
||||||
key != "nomultiscrape" && key != "nocontentscrape" &&
|
|
||||||
key != "nocontentscrape")
|
|
||||||
mEditors.at(i)->setValue(metadata->get(key));
|
mEditors.at(i)->setValue(metadata->get(key));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -233,6 +233,47 @@ void DetailedGameListView::initMDValues()
|
||||||
void DetailedGameListView::updateInfoPanel()
|
void DetailedGameListView::updateInfoPanel()
|
||||||
{
|
{
|
||||||
FileData* file = (mList.size() == 0 || mList.isScrolling()) ? nullptr : mList.getSelected();
|
FileData* file = (mList.size() == 0 || mList.isScrolling()) ? nullptr : mList.getSelected();
|
||||||
|
bool hideMetaDataFields = false;
|
||||||
|
|
||||||
|
if (file)
|
||||||
|
hideMetaDataFields = (file->metadata.get("hidemetadata") == "true");
|
||||||
|
|
||||||
|
if (hideMetaDataFields) {
|
||||||
|
mLblRating.setVisible(false);
|
||||||
|
mRating.setVisible(false);
|
||||||
|
mLblReleaseDate.setVisible(false);
|
||||||
|
mReleaseDate.setVisible(false);
|
||||||
|
mLblDeveloper.setVisible(false);
|
||||||
|
mDeveloper.setVisible(false);
|
||||||
|
mLblPublisher.setVisible(false);
|
||||||
|
mPublisher.setVisible(false);
|
||||||
|
mLblGenre.setVisible(false);
|
||||||
|
mGenre.setVisible(false);
|
||||||
|
mLblPlayers.setVisible(false);
|
||||||
|
mPlayers.setVisible(false);
|
||||||
|
mLblLastPlayed.setVisible(false);
|
||||||
|
mLastPlayed.setVisible(false);
|
||||||
|
mLblPlayCount.setVisible(false);
|
||||||
|
mPlayCount.setVisible(false);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
mLblRating.setVisible(true);
|
||||||
|
mRating.setVisible(true);
|
||||||
|
mLblReleaseDate.setVisible(true);
|
||||||
|
mReleaseDate.setVisible(true);
|
||||||
|
mLblDeveloper.setVisible(true);
|
||||||
|
mDeveloper.setVisible(true);
|
||||||
|
mLblPublisher.setVisible(true);
|
||||||
|
mPublisher.setVisible(true);
|
||||||
|
mLblGenre.setVisible(true);
|
||||||
|
mGenre.setVisible(true);
|
||||||
|
mLblPlayers.setVisible(true);
|
||||||
|
mPlayers.setVisible(true);
|
||||||
|
mLblLastPlayed.setVisible(true);
|
||||||
|
mLastPlayed.setVisible(true);
|
||||||
|
mLblPlayCount.setVisible(true);
|
||||||
|
mPlayCount.setVisible(true);
|
||||||
|
}
|
||||||
|
|
||||||
bool fadingOut;
|
bool fadingOut;
|
||||||
if (file == nullptr) {
|
if (file == nullptr) {
|
||||||
|
@ -256,12 +297,17 @@ void DetailedGameListView::updateInfoPanel()
|
||||||
mName.setValue(file->metadata.get("name"));
|
mName.setValue(file->metadata.get("name"));
|
||||||
|
|
||||||
if (file->getType() == GAME) {
|
if (file->getType() == GAME) {
|
||||||
|
if (!hideMetaDataFields) {
|
||||||
mLastPlayed.setValue(file->metadata.get("lastplayed"));
|
mLastPlayed.setValue(file->metadata.get("lastplayed"));
|
||||||
mPlayCount.setValue(file->metadata.get("playcount"));
|
mPlayCount.setValue(file->metadata.get("playcount"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (file->getType() == FOLDER) {
|
else if (file->getType() == FOLDER) {
|
||||||
|
if (!hideMetaDataFields) {
|
||||||
mLastPlayed.setValue(file->metadata.get("lastplayed"));
|
mLastPlayed.setValue(file->metadata.get("lastplayed"));
|
||||||
mPlayCount.setValue("");
|
mLblPlayCount.setVisible(false);
|
||||||
|
mPlayCount.setVisible(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fadingOut = false;
|
fadingOut = false;
|
||||||
|
|
|
@ -352,6 +352,47 @@ void GridGameListView::initMDValues()
|
||||||
void GridGameListView::updateInfoPanel()
|
void GridGameListView::updateInfoPanel()
|
||||||
{
|
{
|
||||||
FileData* file = (mGrid.size() == 0 || mGrid.isScrolling()) ? nullptr : mGrid.getSelected();
|
FileData* file = (mGrid.size() == 0 || mGrid.isScrolling()) ? nullptr : mGrid.getSelected();
|
||||||
|
bool hideMetaDataFields = false;
|
||||||
|
|
||||||
|
if (file)
|
||||||
|
hideMetaDataFields = (file->metadata.get("hidemetadata") == "true");
|
||||||
|
|
||||||
|
if (hideMetaDataFields) {
|
||||||
|
mLblRating.setVisible(false);
|
||||||
|
mRating.setVisible(false);
|
||||||
|
mLblReleaseDate.setVisible(false);
|
||||||
|
mReleaseDate.setVisible(false);
|
||||||
|
mLblDeveloper.setVisible(false);
|
||||||
|
mDeveloper.setVisible(false);
|
||||||
|
mLblPublisher.setVisible(false);
|
||||||
|
mPublisher.setVisible(false);
|
||||||
|
mLblGenre.setVisible(false);
|
||||||
|
mGenre.setVisible(false);
|
||||||
|
mLblPlayers.setVisible(false);
|
||||||
|
mPlayers.setVisible(false);
|
||||||
|
mLblLastPlayed.setVisible(false);
|
||||||
|
mLastPlayed.setVisible(false);
|
||||||
|
mLblPlayCount.setVisible(false);
|
||||||
|
mPlayCount.setVisible(false);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
mLblRating.setVisible(true);
|
||||||
|
mRating.setVisible(true);
|
||||||
|
mLblReleaseDate.setVisible(true);
|
||||||
|
mReleaseDate.setVisible(true);
|
||||||
|
mLblDeveloper.setVisible(true);
|
||||||
|
mDeveloper.setVisible(true);
|
||||||
|
mLblPublisher.setVisible(true);
|
||||||
|
mPublisher.setVisible(true);
|
||||||
|
mLblGenre.setVisible(true);
|
||||||
|
mGenre.setVisible(true);
|
||||||
|
mLblPlayers.setVisible(true);
|
||||||
|
mPlayers.setVisible(true);
|
||||||
|
mLblLastPlayed.setVisible(true);
|
||||||
|
mLastPlayed.setVisible(true);
|
||||||
|
mLblPlayCount.setVisible(true);
|
||||||
|
mPlayCount.setVisible(true);
|
||||||
|
}
|
||||||
|
|
||||||
bool fadingOut;
|
bool fadingOut;
|
||||||
if (file == nullptr) {
|
if (file == nullptr) {
|
||||||
|
@ -384,12 +425,17 @@ void GridGameListView::updateInfoPanel()
|
||||||
mName.setValue(file->metadata.get("name"));
|
mName.setValue(file->metadata.get("name"));
|
||||||
|
|
||||||
if (file->getType() == GAME) {
|
if (file->getType() == GAME) {
|
||||||
|
if (!hideMetaDataFields) {
|
||||||
mLastPlayed.setValue(file->metadata.get("lastplayed"));
|
mLastPlayed.setValue(file->metadata.get("lastplayed"));
|
||||||
mPlayCount.setValue(file->metadata.get("playcount"));
|
mPlayCount.setValue(file->metadata.get("playcount"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (file->getType() == FOLDER) {
|
else if (file->getType() == FOLDER) {
|
||||||
|
if (!hideMetaDataFields) {
|
||||||
mLastPlayed.setValue(file->metadata.get("lastplayed"));
|
mLastPlayed.setValue(file->metadata.get("lastplayed"));
|
||||||
mPlayCount.setValue("");
|
mLblPlayCount.setVisible(false);
|
||||||
|
mPlayCount.setVisible(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fadingOut = false;
|
fadingOut = false;
|
||||||
|
|
|
@ -265,9 +265,50 @@ void VideoGameListView::initMDValues()
|
||||||
void VideoGameListView::updateInfoPanel()
|
void VideoGameListView::updateInfoPanel()
|
||||||
{
|
{
|
||||||
FileData* file = (mList.size() == 0 || mList.isScrolling()) ? nullptr : mList.getSelected();
|
FileData* file = (mList.size() == 0 || mList.isScrolling()) ? nullptr : mList.getSelected();
|
||||||
|
bool hideMetaDataFields = false;
|
||||||
|
|
||||||
Utils::FileSystem::removeFile(getTitlePath());
|
Utils::FileSystem::removeFile(getTitlePath());
|
||||||
|
|
||||||
|
if (file)
|
||||||
|
hideMetaDataFields = (file->metadata.get("hidemetadata") == "true");
|
||||||
|
|
||||||
|
if (hideMetaDataFields) {
|
||||||
|
mLblRating.setVisible(false);
|
||||||
|
mRating.setVisible(false);
|
||||||
|
mLblReleaseDate.setVisible(false);
|
||||||
|
mReleaseDate.setVisible(false);
|
||||||
|
mLblDeveloper.setVisible(false);
|
||||||
|
mDeveloper.setVisible(false);
|
||||||
|
mLblPublisher.setVisible(false);
|
||||||
|
mPublisher.setVisible(false);
|
||||||
|
mLblGenre.setVisible(false);
|
||||||
|
mGenre.setVisible(false);
|
||||||
|
mLblPlayers.setVisible(false);
|
||||||
|
mPlayers.setVisible(false);
|
||||||
|
mLblLastPlayed.setVisible(false);
|
||||||
|
mLastPlayed.setVisible(false);
|
||||||
|
mLblPlayCount.setVisible(false);
|
||||||
|
mPlayCount.setVisible(false);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
mLblRating.setVisible(true);
|
||||||
|
mRating.setVisible(true);
|
||||||
|
mLblReleaseDate.setVisible(true);
|
||||||
|
mReleaseDate.setVisible(true);
|
||||||
|
mLblDeveloper.setVisible(true);
|
||||||
|
mDeveloper.setVisible(true);
|
||||||
|
mLblPublisher.setVisible(true);
|
||||||
|
mPublisher.setVisible(true);
|
||||||
|
mLblGenre.setVisible(true);
|
||||||
|
mGenre.setVisible(true);
|
||||||
|
mLblPlayers.setVisible(true);
|
||||||
|
mPlayers.setVisible(true);
|
||||||
|
mLblLastPlayed.setVisible(true);
|
||||||
|
mLastPlayed.setVisible(true);
|
||||||
|
mLblPlayCount.setVisible(true);
|
||||||
|
mPlayCount.setVisible(true);
|
||||||
|
}
|
||||||
|
|
||||||
bool fadingOut;
|
bool fadingOut;
|
||||||
if (file == nullptr) {
|
if (file == nullptr) {
|
||||||
mVideo->setVideo("");
|
mVideo->setVideo("");
|
||||||
|
@ -300,12 +341,17 @@ void VideoGameListView::updateInfoPanel()
|
||||||
mName.setValue(file->metadata.get("name"));
|
mName.setValue(file->metadata.get("name"));
|
||||||
|
|
||||||
if (file->getType() == GAME) {
|
if (file->getType() == GAME) {
|
||||||
|
if (!hideMetaDataFields) {
|
||||||
mLastPlayed.setValue(file->metadata.get("lastplayed"));
|
mLastPlayed.setValue(file->metadata.get("lastplayed"));
|
||||||
mPlayCount.setValue(file->metadata.get("playcount"));
|
mPlayCount.setValue(file->metadata.get("playcount"));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (file->getType() == FOLDER) {
|
else if (file->getType() == FOLDER) {
|
||||||
|
if (!hideMetaDataFields) {
|
||||||
mLastPlayed.setValue(file->metadata.get("lastplayed"));
|
mLastPlayed.setValue(file->metadata.get("lastplayed"));
|
||||||
mPlayCount.setValue("");
|
mLblPlayCount.setVisible(false);
|
||||||
|
mPlayCount.setVisible(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fadingOut = false;
|
fadingOut = false;
|
||||||
|
|
Loading…
Reference in a new issue