diff --git a/include/downloader.h b/include/downloader.h index ce04c9a..ee0bbca 100644 --- a/include/downloader.h +++ b/include/downloader.h @@ -59,7 +59,6 @@ class Downloader int downloadCovers(std::string gamename, std::string directory, std::string cover_xml_data); int login(); int getGameDetails(); - void fixInstallerLanguagePath(gameDetails& game); void getGameList(); size_t getResumePosition(); CURLcode beginDownload(); diff --git a/src/downloader.cpp b/src/downloader.cpp index 0a7dd9b..94e2d6b 100644 --- a/src/downloader.cpp +++ b/src/downloader.cpp @@ -229,7 +229,6 @@ int Downloader::getGameDetails() game = gogAPI->getGameDetails(gameNames[i], config.iInstallerType, config.iInstallerLanguage); if (!gogAPI->getError()) { - this->fixInstallerLanguagePath(game); if (!config.bUpdateCheck) games.push_back(game); else @@ -260,34 +259,6 @@ int Downloader::getGameDetails() return 0; } -// Adds language to installer path if it is missing -void Downloader::fixInstallerLanguagePath(gameDetails& game) -{ - for (unsigned int i = 0; i < game.installers.size(); ++i) - { - if (game.installers[i].language != GlobalConstants::LANGUAGE_EN) - { - std::string lang; - for (unsigned int j = 0; j < GlobalConstants::LANGUAGES.size(); ++j) - { - if (game.installers[i].language == GlobalConstants::LANGUAGES[j].languageId) - { - lang = "_" + GlobalConstants::LANGUAGES[j].languageCode + "_"; - break; - } - } - boost::match_results what; - boost::regex expression(lang, boost::regex::perl | boost::regex::icase); - if (!boost::regex_search(game.installers[i].path, what, expression)) - { - boost::regex expression("(.*)_(\\d+\\.\\d+.*$)", boost::regex::perl | boost::regex::icase); - boost::regex_search(game.installers[i].path,what,expression); - game.installers[i].path = what[1] + lang + what[2]; - } - } - } -} - void Downloader::listGames() { if (config.bListDetails) // Detailed list