From afe5d98c39c1989cb2419b8245ee6c2e1ff80579 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Tue, 28 Jul 2020 21:08:17 +0200 Subject: [PATCH] Enabled scraping for folders and changed file info to lowercase. --- es-app/src/MetaData.cpp | 1 + es-app/src/SystemData.cpp | 2 +- es-app/src/guis/GuiMetaDataEd.cpp | 12 +++++------- es-app/src/views/ViewController.cpp | 1 - 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/es-app/src/MetaData.cpp b/es-app/src/MetaData.cpp index ad119d800..f08f64bcd 100644 --- a/es-app/src/MetaData.cpp +++ b/es-app/src/MetaData.cpp @@ -39,6 +39,7 @@ const std::vector gameMDD(gameDecls, gameDecls + MetaDataDecl folderDecls[] = { {"name", MD_STRING, "", false, "name", "enter game name", true}, {"desc", MD_MULTILINE_STRING, "", false, "description", "enter description", true}, +{"rating", MD_RATING, "0", false, "rating", "enter rating", true}, {"developer", MD_STRING, "unknown", false, "developer", "enter game developer", true}, {"publisher", MD_STRING, "unknown", false, "publisher", "enter game publisher", true}, {"genre", MD_STRING, "unknown", false, "genre", "enter game genre", true}, diff --git a/es-app/src/SystemData.cpp b/es-app/src/SystemData.cpp index 69a66ff34..6ec63bcca 100644 --- a/es-app/src/SystemData.cpp +++ b/es-app/src/SystemData.cpp @@ -572,7 +572,7 @@ FileData* SystemData::getRandomGame(const FileData* currentGame) std::vector noFolderList; for (auto it = childrenList.cbegin(); it != childrenList.cend(); it++) { - if ((*it)->getType() == GAME) + if ((*it)->getType() == GAME || (*it)->getParent()->getOnlyFoldersFlag()) noFolderList.push_back((*it)); } gameList.erase(gameList.cbegin(), gameList.cend()); diff --git a/es-app/src/guis/GuiMetaDataEd.cpp b/es-app/src/guis/GuiMetaDataEd.cpp index e46e95c36..6821f46d9 100644 --- a/es-app/src/guis/GuiMetaDataEd.cpp +++ b/es-app/src/guis/GuiMetaDataEd.cpp @@ -57,8 +57,8 @@ GuiMetaDataEd::GuiMetaDataEd( mTitle = std::make_shared(mWindow, "EDIT METADATA", Font::get(FONT_SIZE_LARGE), 0x555555FF, ALIGN_CENTER); mSubtitle = std::make_shared(mWindow, - Utils::String::toUpper(Utils::FileSystem::getFileName(scraperParams.game-> - getPath())), Font::get(FONT_SIZE_SMALL), 0x777777FF, ALIGN_CENTER); + Utils::FileSystem::getFileName(scraperParams.game-> + getPath()), Font::get(FONT_SIZE_SMALL), 0x777777FF, ALIGN_CENTER); mHeaderGrid->setEntry(mTitle, Vector2i(0, 1), false, true); mHeaderGrid->setEntry(mSubtitle, Vector2i(0, 3), false, true); @@ -228,11 +228,9 @@ GuiMetaDataEd::GuiMetaDataEd( std::vector> buttons; - if (mScraperParams.game->getType() != FOLDER) { - if (!scraperParams.system->hasPlatformId(PlatformIds::PLATFORM_IGNORE)) - buttons.push_back(std::make_shared(mWindow, "SCRAPE", "scrape", - std::bind(&GuiMetaDataEd::fetch, this))); - } + if (!scraperParams.system->hasPlatformId(PlatformIds::PLATFORM_IGNORE)) + buttons.push_back(std::make_shared(mWindow, "SCRAPE", "scrape", + std::bind(&GuiMetaDataEd::fetch, this))); buttons.push_back(std::make_shared(mWindow, "SAVE", "save metadata", [&] { save(); delete this; })); diff --git a/es-app/src/views/ViewController.cpp b/es-app/src/views/ViewController.cpp index 2508391f2..1fdef57d1 100644 --- a/es-app/src/views/ViewController.cpp +++ b/es-app/src/views/ViewController.cpp @@ -430,7 +430,6 @@ bool ViewController::input(InputConfig* config, Input input) // If we have previously launched a game and there is now input registered, it means // the user is back in ES, so unset the flag to indicate that a game has been launched // and update all the GUI components to reflect this. - bool testbool = mWindow->getGameLaunchedState(); if (mWindow->getGameLaunchedState()) mWindow->unsetLaunchedGame(); }