From a066e99badfa393d66f813243734f72406aa0d37 Mon Sep 17 00:00:00 2001 From: Sandy Carter Date: Mon, 17 Aug 2015 19:20:57 -0400 Subject: [PATCH 1/2] If no login method is defined default to api --- main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.cpp b/main.cpp index b8df4a5..c730c5f 100644 --- a/main.cpp +++ b/main.cpp @@ -423,6 +423,8 @@ int main(int argc, char *argv[]) int iLoginResult = 0; if (config.bLoginAPI || config.bLoginHTTP || initResult == 1) { + if (!config.bLoginAPI && !config.bLoginHTTP) + downloader.config.bLoginAPI = true; iLoginResult = downloader.login(); if (iLoginResult == 0) return 1; From 9c2f35bb27845e3185bdfd8c95f1e81fa35ac1db Mon Sep 17 00:00:00 2001 From: Sandy Carter Date: Mon, 17 Aug 2015 19:27:23 -0400 Subject: [PATCH 2/2] Only return if --save-config is specified Continue running commands if login was forced due to missing configuration Allow downloading of files even if config is missing with only one prompt for username and password --- main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index c730c5f..47d9a9a 100644 --- a/main.cpp +++ b/main.cpp @@ -491,7 +491,8 @@ int main(int argc, char *argv[]) } ofs.close(); Util::setFilePermissions(config.sConfigFilePath, boost::filesystem::owner_read | boost::filesystem::owner_write); - return 0; + if (config.bSaveConfig) + return 0; } else { @@ -519,7 +520,7 @@ int main(int argc, char *argv[]) return 1; } } - else if (config.bShowWishlist) + if (config.bShowWishlist) downloader.showWishlist(); else if (config.bUpdateCache) downloader.updateCache();