diff --git a/RetroFE/Source/Collection/CollectionInfoBuilder.cpp b/RetroFE/Source/Collection/CollectionInfoBuilder.cpp index 2843f54..1f38e7a 100644 --- a/RetroFE/Source/Collection/CollectionInfoBuilder.cpp +++ b/RetroFE/Source/Collection/CollectionInfoBuilder.cpp @@ -121,9 +121,6 @@ bool CollectionInfoBuilder::createCollectionDirectory(std::string name) settingsFile << "launcher = mame" << std::endl; settingsFile << "#metadata.type = MAME" << std::endl; settingsFile << std::endl; - settingsFile << "#manufacturer = " << std::endl; - settingsFile << "#year = " << std::endl; - settingsFile << "#genre = " << std::endl; settingsFile << std::endl; settingsFile << "#media.screenshot = " << Utils::combinePath("%BASE_MEDIA_PATH%", "%ITEM_COLLECTION_NAME%", "medium_artwork", "screenshot") << std::endl; settingsFile << "#media.screentitle = " << Utils::combinePath("%BASE_MEDIA_PATH%", "%ITEM_COLLECTION_NAME%", "medium_artwork", "screentitle") << std::endl; diff --git a/RetroFE/Source/Database/Configuration.cpp b/RetroFE/Source/Database/Configuration.cpp index b3996b2..d9845fb 100644 --- a/RetroFE/Source/Database/Configuration.cpp +++ b/RetroFE/Source/Database/Configuration.cpp @@ -74,7 +74,7 @@ bool Configuration::import(std::string keyPrefix, std::string file) return import("", keyPrefix, file); } -bool Configuration::import(std::string collection, std::string keyPrefix, std::string file) +bool Configuration::import(std::string collection, std::string keyPrefix, std::string file, bool mustExist) { bool retVal = true; int lineCount = 0; @@ -86,7 +86,14 @@ bool Configuration::import(std::string collection, std::string keyPrefix, std::s if (!ifs.is_open()) { - Logger::write(Logger::ZONE_ERROR, "Configuration", "Could not open " + file + "\""); + if (mustExist) + { + Logger::write(Logger::ZONE_ERROR, "Configuration", "Could not open " + file + "\""); + } + else + { + Logger::write(Logger::ZONE_INFO, "Configuration", "Could not open " + file + "\""); + } return false; } diff --git a/RetroFE/Source/Database/Configuration.h b/RetroFE/Source/Database/Configuration.h index 0344ce5..da17d2b 100644 --- a/RetroFE/Source/Database/Configuration.h +++ b/RetroFE/Source/Database/Configuration.h @@ -28,7 +28,7 @@ public: static std::string convertToAbsolutePath(std::string prefix, std::string path); // gets the global configuration bool import(std::string keyPrefix, std::string file); - bool import(std::string collection, std::string keyPrefix, std::string file); + bool import(std::string collection, std::string keyPrefix, std::string file, bool mustExist = true); bool getProperty(std::string key, std::string &value); bool getProperty(std::string key, int &value); bool getProperty(std::string key, bool &value); diff --git a/RetroFE/Source/Main.cpp b/RetroFE/Source/Main.cpp index 0915f38..34588a9 100644 --- a/RetroFE/Source/Main.cpp +++ b/RetroFE/Source/Main.cpp @@ -146,6 +146,10 @@ bool ImportConfiguration(Configuration *c) { std::string prefix = "collections." + collection; + std::string infoFile = Utils::combinePath(collectionsPath, collection, "info.conf"); + + c->import(collection, prefix, infoFile, false); + std::string settingsFile = Utils::combinePath(collectionsPath, collection, "settings.conf"); if(!c->import(collection, prefix, settingsFile)) @@ -154,6 +158,7 @@ bool ImportConfiguration(Configuration *c) closedir(dp); return false; } + } }