From 1daff19713617d4da8d8ee64a35259ab23cf3c9b Mon Sep 17 00:00:00 2001 From: Gemba Date: Tue, 26 Nov 2024 18:05:16 +0100 Subject: [PATCH] Support any delimiter for bracketed game titles --- aliasMap.csv | 2 +- config.ini.example | 2 + docs/CHANGELOG.md | 11 +++- docs/CONFIGINI.md | 33 ++++++++++- src/nametools.cpp | 21 ++++--- src/nametools.h | 4 +- src/netmanager.cpp | 1 - src/scraperworker.cpp | 29 +++++++-- src/settings.cpp | 8 +++ src/settings.h | 134 ++++++++++++++++++++++-------------------- src/skyscraper.cpp | 2 +- 11 files changed, 163 insertions(+), 84 deletions(-) diff --git a/aliasMap.csv b/aliasMap.csv index f40a5f6d..9c627d67 100644 --- a/aliasMap.csv +++ b/aliasMap.csv @@ -5,7 +5,7 @@ # This file is global and will be used when scraping ANY platform. # # Note 2: -# All bracket info in the search name alias is ignored. +# All bracket/parenthesis info in the search name alias is ignored. # It merely provides a different base name for Skyscraper when it creates # the search query. It is meant to help scrape files that have abstract file- # names where the search-based scraping modules have a hard time finding good diff --git a/config.ini.example b/config.ini.example index 7324cc53..058b82f5 100644 --- a/config.ini.example +++ b/config.ini.example @@ -75,6 +75,8 @@ ;scummIni="/full/path/to/scummvm.ini" ;tidyDesc="true" ;onlyMissing="false" +;innerBracketsReplace="] [" +;innerParenthesesReplace=") (" ; The following is an example of configs that only affect the 'snes' platform. ;[snes] diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 3c23ff06..27944e81 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -7,9 +7,16 @@ humans](https://keepachangelog.com). - Added: Support for [XDG Base Directories](XDG.md), thanks for the suggestion @ASHGOLDOFFICIAL. -- Added: Option `--hint`, shows a random Tip of the Day +- Added: Option to allow any delimiter between consecutive brackets and + parentheses in gamelist title. See + [`innerBracketsReplace`](CONFIGINI.md#innerbracketsreplace) for examples. + Thanks for the suggestion, @retrobit. +- Added: [Platform 'Fujitsu + FM-Towns'](https://github.com/Gemba/skyscraper/pull/95/files). Manually update + your `peas.json` and `platformid_map.csv` to make use of it. +- Added: Option `--hint`, it shows a random Tip of the Day. - Updated: Skyscraper's hardcoded `/home/` replaced with the actual user's - home directory screen messages, thanks for highlighting it on the Mac, + home directory screen messages. Thanks for highlighting it on the Mac, @cdaters - Updated: A downloaded `whdload.xml` file for platform Amiga will be not downloaded again until the server indicates. Manually removing diff --git a/docs/CONFIGINI.md b/docs/CONFIGINI.md index 421bcb20..8cc1dd9b 100644 --- a/docs/CONFIGINI.md +++ b/docs/CONFIGINI.md @@ -88,6 +88,8 @@ This is an alphabetical index of all configuration options including the section | [importFolder](CONFIGINI.md#importfolder) | Y | Y | | | | [includeFrom](CONFIGINI.md#includefrom) | Y | Y | | | | [includePattern](CONFIGINI.md#includepattern) | Y | Y | Y | | +| [innerBracketsReplace](CONFIGINI.md#innerbracketsreplace) | Y | | | | +| [innerParenthesesReplace](CONFIGINI.md#innerparenthesesreplace) | Y | | | | | [inputFolder](CONFIGINI.md#inputfolder) | Y | Y | | | | [interactive](CONFIGINI.md#interactive) | Y | Y | | Y | | [jpgQuality](CONFIGINI.md#jpgquality) | Y | Y | | Y | @@ -241,7 +243,7 @@ By default Skyscraper uses just the title as the game name when generating gamel - `%t`: The game title as returned by the scraping sources without bracket information (see `%b` and `%B` below) - `%f`: The game filename without extension and bracket information (see `%b` and `%B` below) -- `%b`: The game `()` bracket information. This information often comes from the filename, but can also come from the scraping source title (eg. `(USA)` or `(en,fr,de)`) +- `%b`: The game `()` parentheses information. This information often comes from the filename, but can also come from the scraping source title (eg. `(USA)` or `(en,fr,de)`) - `%B`: The game `[]` bracket information. This information often comes from the filename, but can also come from the scraping source title (eg. `[disk 1 of 2]` or `[AGA]`) - `%a`: The age restriction as returned by the scraping sources (eg. `16+`) - `%d`: The game developer as returned by the scraping sources @@ -517,6 +519,35 @@ Allowed in sections: `[main]`, `[]`, `[]` --- +#### innerBracketsReplace + +Only in use when the option `brackets` is set to `true` for gamelist creation: +This replaces consecutive brackets `][` in the game title with whatever is +defined in this option. This setting has no effect, if there is only one bracket +present in the game filename. +Use the option `innerParenthesesReplace` for the same effect on round brackets +`)(` (aka. parentheses). + +**Example(s)** + +Filename: `Oddworld - Abe's Exoddus [NTSC-U] [SLUS-00710].m3u` + +- `innerBracketsReplace=""` (unset), gamelist game title output: `Oddworld - Abe's Exoddus [NTSC-U][SLUS-00710]` +- `innerBracketsReplace="] ["`, gamelist game title output (_note the space._): `Oddworld - Abe's Exoddus [NTSC-U] [SLUS-00710]` +- `innerBracketsReplace=","`, gamelist game title output: `Oddworld - Abe's Exoddus [NTSC-U,SLUS-00710]` + +Default value: unset +Allowed in sections: `[main]` + +--- + +#### innerParenthesesReplace + +Same as [innerBracketsReplace](#innerbracketsreplace) but for parentheses `)(` +(aka. round brackets). + +--- + #### maxLength Sets the maximum length of returned game descriptions. This is a convenience option if you feel like game descriptions are too long. By default it is set to 2500. diff --git a/src/nametools.cpp b/src/nametools.cpp index b9da906b..0e9e468b 100644 --- a/src/nametools.cpp +++ b/src/nametools.cpp @@ -33,6 +33,7 @@ #include #include #include +#include QString NameTools::getScummName(const QFileInfo &info, const QString baseName, const QString scummIni) { @@ -280,6 +281,7 @@ QString NameTools::notesByRegex(const QString &baseName, const QString &re) { QString NameTools::getSqrNotes(QString baseName) { // Get square notes: Pattern to match text in brackets QString sqrNotes = notesByRegex(baseName, "\\[([^[\\]]+)\\]"); + qDebug() << "sqrNotes pre:" << sqrNotes; // Look for '_tag_' or '[tag]' with the last char optional QMap replacements = { @@ -292,10 +294,13 @@ QString NameTools::getSqrNotes(QString baseName) { QMapIterator i(replacements); while (i.hasNext()) { i.next(); - if (QRegularExpression(i.key()).match(baseName).hasMatch()) { - sqrNotes.append("[" + i.value() + "]"); + if (QRegularExpression(i.key()).match(baseName).hasMatch() && + /* avoid NTSC-U being replicated to NTSC on psx */ + !sqrNotes.contains("[" + i.value(), Qt::CaseInsensitive)) { + sqrNotes.append("[" % i.value() % "]"); } } + qDebug() << "sqrNotes post:" << sqrNotes; return sqrNotes.simplified(); } @@ -390,7 +395,9 @@ QString NameTools::getCacheId(const QFileInfo &info) { } QString NameTools::getNameFromTemplate(const GameEntry &game, - const QString &nameTemplate) { + const QString &nameTemplate, + const QString &parenthesesInfo, + const QString &bracketInfo) { QList templateGroups = nameTemplate.split(";"); QString finalName; for (auto &templateGroup : templateGroups) { @@ -401,10 +408,10 @@ QString NameTools::getNameFromTemplate(const GameEntry &game, if (templateGroup.contains("%f") && !game.baseName.isEmpty()) { include = true; } - if (templateGroup.contains("%b") && !game.parNotes.isEmpty()) { + if (templateGroup.contains("%b") && !parenthesesInfo.isEmpty()) { include = true; } - if (templateGroup.contains("%B") && !game.sqrNotes.isEmpty()) { + if (templateGroup.contains("%B") && !bracketInfo.isEmpty()) { include = true; } if (templateGroup.contains("%a") && !game.ages.isEmpty()) { @@ -425,8 +432,8 @@ QString NameTools::getNameFromTemplate(const GameEntry &game, if (include) { templateGroup.replace("%t", game.title); templateGroup.replace("%f", StrTools::stripBrackets(game.baseName)); - templateGroup.replace("%b", game.parNotes); - templateGroup.replace("%B", game.sqrNotes); + templateGroup.replace("%b", parenthesesInfo); + templateGroup.replace("%B", bracketInfo); templateGroup.replace("%a", game.ages); templateGroup.replace("%d", game.developer); templateGroup.replace("%p", game.publisher); diff --git a/src/nametools.h b/src/nametools.h index 8c5d5cdb..c744cf2e 100644 --- a/src/nametools.h +++ b/src/nametools.h @@ -48,7 +48,9 @@ class NameTools : public QObject { static QString getUniqueNotes(const QString ¬es, QChar delim); static QString getCacheId(const QFileInfo &info); static QString getNameFromTemplate(const GameEntry &game, - const QString &nameTemplate); + const QString &nameTemplate, + const QString &parenthesesInfo, + const QString &bracketInfo); private: static QString notesByRegex(const QString &baseName, const QString &re); diff --git a/src/netmanager.cpp b/src/netmanager.cpp index cf53e1c4..4b79eb59 100644 --- a/src/netmanager.cpp +++ b/src/netmanager.cpp @@ -34,7 +34,6 @@ QNetworkReply *NetManager::getRequest(const QNetworkRequest &request) { return get(request); } - QNetworkReply *NetManager::headRequest(const QNetworkRequest &request) { QMutexLocker locker(&requestMutex); return head(request); diff --git a/src/scraperworker.cpp b/src/scraperworker.cpp index e276c9d3..f618cedf 100644 --- a/src/scraperworker.cpp +++ b/src/scraperworker.cpp @@ -364,9 +364,29 @@ void ScraperWorker::run() { output.append("Title: '\033[1;32m" + game.title + "\033[0m' (" + game.titleSrc + ")\n"); } + + QString bracketInfo = game.sqrNotes; + QString parenthesesInfo = game.parNotes; + if (config.brackets) { + if (!config.innerBracketsReplace.isEmpty()) { + bracketInfo = + bracketInfo.replace("][", config.innerBracketsReplace); + } + if (!bracketInfo.isEmpty()) { + bracketInfo = " " % bracketInfo; + } + if (!config.innerParenthesesReplace.isEmpty()) { + parenthesesInfo = parenthesesInfo.replace( + ")(", config.innerParenthesesReplace); + } + if (!parenthesesInfo.isEmpty()) { + parenthesesInfo = " " % parenthesesInfo; + } + } + if (!config.nameTemplate.isEmpty()) { - game.title = StrTools::xmlUnescape( - NameTools::getNameFromTemplate(game, config.nameTemplate)); + game.title = StrTools::xmlUnescape(NameTools::getNameFromTemplate( + game, config.nameTemplate, parenthesesInfo, bracketInfo)); } else { game.title = StrTools::xmlUnescape(game.title); if (config.forceFilename) { @@ -374,9 +394,8 @@ void ScraperWorker::run() { StrTools::stripBrackets(info.completeBaseName())); } if (config.brackets) { - game.title.append(StrTools::xmlUnescape( - (game.parNotes != "" ? " " + game.parNotes : "") + - (game.sqrNotes != "" ? " " + game.sqrNotes : ""))); + game.title.append( + StrTools::xmlUnescape(parenthesesInfo % bracketInfo)); } } output.append("Platform: '\033[1;32m" + game.platform + diff --git a/src/settings.cpp b/src/settings.cpp index eb7e1c3d..1c4e245b 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -232,6 +232,14 @@ void RuntimeCfg::applyConfigIni(CfgType type, QSettings *settings, config->includeFrom = v; continue; } + if (k == "innerBracketsReplace") { + config->innerBracketsReplace = v; + continue; + } + if (k == "innerParenthesesReplace") { + config->innerParenthesesReplace = v; + continue; + } if (k == "inputFolder") { config->inputFolder = (type == CfgType::MAIN) ? concatPath(v, config->platform) diff --git a/src/settings.h b/src/settings.h index ea7dbee8..11a8fe85 100644 --- a/src/settings.h +++ b/src/settings.h @@ -140,6 +140,8 @@ struct Settings { bool skipExistingTextures = false; bool cacheTextures = true; bool skipExistingManuals = false; + QString innerBracketsReplace = ""; + QString innerParenthesesReplace = ""; QString user = ""; QString password = ""; @@ -187,71 +189,73 @@ class RuntimeCfg : public QObject { QMap> params = { // clang-format off - {"addExtensions", QPair("str", CfgType::MAIN | CfgType::PLATFORM )}, - {"addFolders", QPair("bool", CfgType::FRONTEND )}, - {"artworkXml", QPair("str", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND )}, - {"brackets", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND )}, - {"cacheCovers", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::SCRAPER )}, - {"cacheFolder", QPair("str", CfgType::MAIN | CfgType::PLATFORM )}, - {"cacheMarquees", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::SCRAPER )}, - {"cacheRefresh", QPair("bool", CfgType::MAIN | CfgType::SCRAPER )}, - {"cacheResize", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::SCRAPER )}, - {"cacheScreenshots", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::SCRAPER )}, - {"cacheTextures", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::SCRAPER )}, - {"cacheWheels", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::SCRAPER )}, - {"cropBlack", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND )}, - {"emulator", QPair("str", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND )}, - {"endAt", QPair("str", CfgType::PLATFORM | CfgType::FRONTEND )}, - {"excludeFrom", QPair("str", CfgType::MAIN | CfgType::PLATFORM )}, - {"excludePattern", QPair("str", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND )}, - {"extensions", QPair("str", CfgType::PLATFORM )}, - {"forceFilename", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND )}, - {"frontend", QPair("str", CfgType::MAIN )}, - {"gameListBackup", QPair("bool", CfgType::MAIN | CfgType::FRONTEND )}, - {"gameListFolder", QPair("str", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND )}, - {"gameListVariants", QPair("str", CfgType::FRONTEND )}, - {"hints", QPair("bool", CfgType::MAIN )}, - {"importFolder", QPair("str", CfgType::MAIN | CfgType::PLATFORM )}, - {"includeFrom", QPair("str", CfgType::MAIN | CfgType::PLATFORM )}, - {"includePattern", QPair("str", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND )}, - {"inputFolder", QPair("str", CfgType::MAIN | CfgType::PLATFORM )}, - {"interactive", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::SCRAPER )}, - {"jpgQuality", QPair("int", CfgType::MAIN | CfgType::PLATFORM | CfgType::SCRAPER )}, - {"lang", QPair("str", CfgType::MAIN | CfgType::PLATFORM )}, - {"langPrios", QPair("str", CfgType::MAIN | CfgType::PLATFORM )}, - {"launch", QPair("str", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND )}, - {"manuals", QPair("bool", CfgType::MAIN | CfgType::PLATFORM )}, - {"maxFails", QPair("int", CfgType::MAIN )}, - {"maxLength", QPair("int", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND | CfgType::SCRAPER )}, - {"mediaFolder", QPair("str", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND )}, - {"mediaFolderHidden", QPair("bool", CfgType::FRONTEND )}, - {"minMatch", QPair("int", CfgType::MAIN | CfgType::PLATFORM | CfgType::SCRAPER )}, - {"nameTemplate", QPair("str", CfgType::MAIN | CfgType::PLATFORM )}, - {"onlyMissing", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::SCRAPER )}, - {"platform", QPair("str", CfgType::MAIN )}, - {"pretend", QPair("bool", CfgType::MAIN | CfgType::PLATFORM )}, - {"region", QPair("str", CfgType::MAIN | CfgType::PLATFORM )}, - {"regionPrios", QPair("str", CfgType::MAIN | CfgType::PLATFORM )}, - {"relativePaths", QPair("bool", CfgType::MAIN | CfgType::PLATFORM )}, - {"scummIni", QPair("str", CfgType::MAIN )}, - {"skipped", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND )}, - {"spaceCheck", QPair("bool", CfgType::MAIN )}, - {"startAt", QPair("str", CfgType::PLATFORM | CfgType::FRONTEND )}, - {"subdirs", QPair("bool", CfgType::MAIN | CfgType::PLATFORM )}, - {"symlink", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND )}, - {"theInFront", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND )}, - {"threads", QPair("int", CfgType::MAIN | CfgType::PLATFORM | CfgType::SCRAPER )}, - {"tidyDesc", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::SCRAPER )}, - {"unattend", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND | CfgType::SCRAPER )}, - {"unattendSkip", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND | CfgType::SCRAPER )}, - {"unpack", QPair("bool", CfgType::MAIN | CfgType::PLATFORM )}, - {"userCreds", QPair("str", CfgType::SCRAPER )}, - {"verbosity", QPair("int", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND )}, - {"videoConvertCommand", QPair("str", CfgType::MAIN | CfgType::SCRAPER )}, - {"videoConvertExtension", QPair("str", CfgType::MAIN | CfgType::SCRAPER )}, - {"videoPreferNormalized", QPair("bool", CfgType::SCRAPER )}, - {"videos", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND | CfgType::SCRAPER )}, - {"videoSizeLimit", QPair("int", CfgType::MAIN | CfgType::PLATFORM | CfgType::SCRAPER )} + {"addExtensions", QPair("str", CfgType::MAIN | CfgType::PLATFORM )}, + {"addFolders", QPair("bool", CfgType::FRONTEND )}, + {"artworkXml", QPair("str", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND )}, + {"brackets", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND )}, + {"cacheCovers", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::SCRAPER )}, + {"cacheFolder", QPair("str", CfgType::MAIN | CfgType::PLATFORM )}, + {"cacheMarquees", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::SCRAPER )}, + {"cacheRefresh", QPair("bool", CfgType::MAIN | CfgType::SCRAPER )}, + {"cacheResize", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::SCRAPER )}, + {"cacheScreenshots", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::SCRAPER )}, + {"cacheTextures", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::SCRAPER )}, + {"cacheWheels", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::SCRAPER )}, + {"cropBlack", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND )}, + {"emulator", QPair("str", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND )}, + {"endAt", QPair("str", CfgType::PLATFORM | CfgType::FRONTEND )}, + {"excludeFrom", QPair("str", CfgType::MAIN | CfgType::PLATFORM )}, + {"excludePattern", QPair("str", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND )}, + {"extensions", QPair("str", CfgType::PLATFORM )}, + {"forceFilename", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND )}, + {"frontend", QPair("str", CfgType::MAIN )}, + {"gameListBackup", QPair("bool", CfgType::MAIN | CfgType::FRONTEND )}, + {"gameListFolder", QPair("str", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND )}, + {"gameListVariants", QPair("str", CfgType::FRONTEND )}, + {"hints", QPair("bool", CfgType::MAIN )}, + {"importFolder", QPair("str", CfgType::MAIN | CfgType::PLATFORM )}, + {"includeFrom", QPair("str", CfgType::MAIN | CfgType::PLATFORM )}, + {"includePattern", QPair("str", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND )}, + {"inputFolder", QPair("str", CfgType::MAIN | CfgType::PLATFORM )}, + {"innerBracketsReplace", QPair("str", CfgType::MAIN )}, + {"innerParenthesesReplace", QPair("str", CfgType::MAIN )}, + {"interactive", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::SCRAPER )}, + {"jpgQuality", QPair("int", CfgType::MAIN | CfgType::PLATFORM | CfgType::SCRAPER )}, + {"lang", QPair("str", CfgType::MAIN | CfgType::PLATFORM )}, + {"langPrios", QPair("str", CfgType::MAIN | CfgType::PLATFORM )}, + {"launch", QPair("str", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND )}, + {"manuals", QPair("bool", CfgType::MAIN | CfgType::PLATFORM )}, + {"maxFails", QPair("int", CfgType::MAIN )}, + {"maxLength", QPair("int", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND | CfgType::SCRAPER )}, + {"mediaFolder", QPair("str", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND )}, + {"mediaFolderHidden", QPair("bool", CfgType::FRONTEND )}, + {"minMatch", QPair("int", CfgType::MAIN | CfgType::PLATFORM | CfgType::SCRAPER )}, + {"nameTemplate", QPair("str", CfgType::MAIN | CfgType::PLATFORM )}, + {"onlyMissing", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::SCRAPER )}, + {"platform", QPair("str", CfgType::MAIN )}, + {"pretend", QPair("bool", CfgType::MAIN | CfgType::PLATFORM )}, + {"region", QPair("str", CfgType::MAIN | CfgType::PLATFORM )}, + {"regionPrios", QPair("str", CfgType::MAIN | CfgType::PLATFORM )}, + {"relativePaths", QPair("bool", CfgType::MAIN | CfgType::PLATFORM )}, + {"scummIni", QPair("str", CfgType::MAIN )}, + {"skipped", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND )}, + {"spaceCheck", QPair("bool", CfgType::MAIN )}, + {"startAt", QPair("str", CfgType::PLATFORM | CfgType::FRONTEND )}, + {"subdirs", QPair("bool", CfgType::MAIN | CfgType::PLATFORM )}, + {"symlink", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND )}, + {"theInFront", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND )}, + {"threads", QPair("int", CfgType::MAIN | CfgType::PLATFORM | CfgType::SCRAPER )}, + {"tidyDesc", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::SCRAPER )}, + {"unattend", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND | CfgType::SCRAPER )}, + {"unattendSkip", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND | CfgType::SCRAPER )}, + {"unpack", QPair("bool", CfgType::MAIN | CfgType::PLATFORM )}, + {"userCreds", QPair("str", CfgType::SCRAPER )}, + {"verbosity", QPair("int", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND )}, + {"videoConvertCommand", QPair("str", CfgType::MAIN | CfgType::SCRAPER )}, + {"videoConvertExtension", QPair("str", CfgType::MAIN | CfgType::SCRAPER )}, + {"videoPreferNormalized", QPair("bool", CfgType::SCRAPER )}, + {"videos", QPair("bool", CfgType::MAIN | CfgType::PLATFORM | CfgType::FRONTEND | CfgType::SCRAPER )}, + {"videoSizeLimit", QPair("int", CfgType::MAIN | CfgType::PLATFORM | CfgType::SCRAPER )} // clang-format on }; }; diff --git a/src/skyscraper.cpp b/src/skyscraper.cpp index 6d0f87b2..af442a34 100644 --- a/src/skyscraper.cpp +++ b/src/skyscraper.cpp @@ -1107,7 +1107,7 @@ void Skyscraper::updateWhdloadDb(NetComm &netComm, QEventLoop &q) { "Amiberry-XML-Builder/master/whdload_db.xml"; netComm.request(url, "HEAD"); q.exec(); - + QString etag = netComm.getHeaderValue("ETag"); QString cachedEtag; QFile whdlEtagFile(Config::getSkyFolder(Config::SkyFolderType::LOG) %