Skip to content

Commit 49d62c6

Browse files
authored
Fixed regression of false warning message (#177)
1 parent e1f8398 commit 49d62c6

1 file changed

Lines changed: 17 additions & 14 deletions

File tree

src/skyscraper.cpp

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,17 +1290,19 @@ void Skyscraper::prepareIgdb(NetComm &netComm, QEventLoop &q) {
12901290
void Skyscraper::prepareScreenscraper(NetComm &netComm, QEventLoop &q) {
12911291
const int threadsFailsafe = 1; // Don't change! This limit was set by
12921292
// request from ScreenScraper
1293-
if ((config.user.isEmpty() || config.password.isEmpty()) &&
1294-
config.threads > 1) {
1295-
config.threads = threadsFailsafe;
1296-
printf("\033[1;33mForcing %d thread as this is the anonymous "
1297-
"limit in the ScreenScraper scraping module. Sign up for "
1298-
"an account at https://www.screenscraper.fr and support "
1299-
"them to gain more threads. Then use the credentials with "
1300-
"Skyscraper using the '-u user:password' command line "
1301-
"option or by setting 'userCreds=\"user:password\"' in "
1302-
"'%s/config.ini'.\033[0m\n\n",
1303-
config.threads, Config::getSkyFolder().toStdString().c_str());
1293+
if (config.user.isEmpty() || config.password.isEmpty()) {
1294+
if (config.threads > 1) {
1295+
config.threads = threadsFailsafe;
1296+
printf("\033[1;33mForcing %d thread as this is the anonymous "
1297+
"limit in the ScreenScraper scraping module. Sign up for "
1298+
"an account at https://www.screenscraper.fr and support "
1299+
"them to gain more threads. Then use the credentials with "
1300+
"Skyscraper using the '-u user:password' command line "
1301+
"option or by setting 'userCreds=\"user:password\"' in "
1302+
"'%s/config.ini'.\033[0m\n\n",
1303+
config.threads,
1304+
Config::getSkyFolder().toStdString().c_str());
1305+
}
13041306
} else {
13051307
printf("Fetching limits for user '\033[1;33m%s\033[0m', just a "
13061308
"sec...\n",
@@ -1341,12 +1343,13 @@ void Skyscraper::prepareScreenscraper(NetComm &netComm, QEventLoop &q) {
13411343
if (allowedThreads != 0) {
13421344
if (config.threadsSet && config.threads <= allowedThreads) {
13431345
printf("User is allowed %d threads, but user has set "
1344-
"it manually, so ignoring.\n\n",
1345-
allowedThreads);
1346+
"it manually to %d, using the latter value.\n\n",
1347+
allowedThreads, config.threads);
13461348
} else {
13471349
config.threads = (allowedThreads <= 8 ? allowedThreads : 8);
13481350
printf("Setting threads to \033[1;32m%d\033[0m as "
1349-
"allowed for the supplied user credentials.\n\n",
1351+
"allowed for the authenticated Screenscraper "
1352+
"account.\n\n",
13501353
config.threads);
13511354
}
13521355
}

0 commit comments

Comments
 (0)