From ac24ea7906e598056e22180745309d3fbfd1179b Mon Sep 17 00:00:00 2001 From: Markus Date: Sat, 17 Aug 2019 18:01:36 +0200 Subject: [PATCH] add default outputfile ... --- parameterManager.cpp | 24 ++++++++++++++---------- parameterManager.h | 2 +- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/parameterManager.cpp b/parameterManager.cpp index 9104925..4c1e262 100644 --- a/parameterManager.cpp +++ b/parameterManager.cpp @@ -99,6 +99,7 @@ int loadDefaulOptions(Settings &settings) ofs << std::endl; ofs << "#Socks5Proxy=127.0.0.1:9050" << std::endl; ofs << "#FarbloseAusgabe=false" << std::endl; + ofs << "#OutputFile=/tmp/a" << std::endl; ofs << std::endl; ofs << "#default-GenaueHoster=Vivo,GoUnlimited" << std::endl; ofs << "#default-Sprachen=GerDub,GerSub,Eng" << std::endl; @@ -144,7 +145,7 @@ int loadDefaulOptions(Settings &settings) std::cout << " => Error_Defaults: Socks5 Proxy: Invalid Ip Addresse: " << ip << std::endl; return 34; } else if(settings.debugMode) { - std::cout << "Defaults: Proxy Addresse: "<< ip << ":" << port << std::endl; + std::cout << " > Defaults: Proxy Addresse: "<< ip << ":" << port << std::endl; } settings.proxy_ip = ip; settings.proxy_port = port; @@ -163,22 +164,22 @@ int loadDefaulOptions(Settings &settings) return 161; } if(settings.debugMode) - std::cout << "Defaults: DebugMode: true" << std::endl; + std::cout << " > Defaults: DebugMode: true" << std::endl; } else if (what == "default-GenaueHoster") { settings.genaueHoster=data; if(settings.debugMode) - std::cout << "Defaults: GenaueHoster: " << settings.genaueHoster << std::endl; + std::cout << " > Defaults: GenaueHoster: " << settings.genaueHoster << std::endl; } else if (what == "default-Sprachen") { settings.languages=data; if(settings.debugMode) - std::cout << "Defaults: Sprachen: " << settings.languages << std::endl; + std::cout << " > Defaults: Sprachen: " << settings.languages << std::endl; } else if (what == "default-CheckSuchMuster") { settings.default_Searchmuster=data; if(settings.debugMode) - std::cout << "Defaults: SuchMuster: " << settings.default_Searchmuster << std::endl; + std::cout << " > Defaults: SuchMuster: " << settings.default_Searchmuster << std::endl; } else if (what == "default-CheckMaxDirs") { settings.default_maxDirs = atoi(data.c_str()); @@ -187,7 +188,7 @@ int loadDefaulOptions(Settings &settings) return 18; } if(settings.debugMode) - std::cout << "Defaults: SuchMuster: " << settings.default_Searchmuster << std::endl; + std::cout << " > Defaults: SuchMuster: " << settings.default_Searchmuster << std::endl; } else if (what == "default-maxThreads") { @@ -198,7 +199,7 @@ int loadDefaulOptions(Settings &settings) return 18; } if(settings.debugMode) - std::cout << "Defaults: MaxThreads: " << settings.maxThreads << std::endl; + std::cout << " > Defaults: MaxThreads: " << settings.maxThreads << std::endl; break; @@ -212,7 +213,7 @@ int loadDefaulOptions(Settings &settings) return 207; } if(settings.debugMode) - std::cout << "Defaults: FarbloseAusgabe: " << settings.colorless << std::endl; + std::cout << " > Defaults: FarbloseAusgabe: " << settings.colorless << std::endl; } else if (what == "search-AchteAufGroßUndKleinschreibung") { if(data == "true") @@ -224,9 +225,12 @@ int loadDefaulOptions(Settings &settings) return 227; } if(settings.debugMode) - std::cout << "Defaults: search-AchteAufGroßUndKleinschreibung: " << settings.search_IgnoreUpperLower << std::endl; + std::cout << " > Defaults: search-AchteAufGroßUndKleinschreibung: " << settings.search_IgnoreUpperLower << std::endl; - } else if (what == "") { + } else if (what == "OutputFile") { + settings.outputFilePath = data; + if(settings.debugMode) + std::cout << " > Defaults: OutputFile: " << settings.outputFilePath << std::endl; } else if (what == "") { diff --git a/parameterManager.h b/parameterManager.h index 2e6f880..8dbbaf9 100644 --- a/parameterManager.h +++ b/parameterManager.h @@ -38,7 +38,7 @@ struct Settings { languages = "GerDub,GerSub,Eng", genaueHoster = "Vivo,GoUnlimited", version = "2.2.2", - defaultFileVersion="1.2", + defaultFileVersion="1.3", outputFilePath = "", default_checkDirPath = "", default_Searchmuster = "S%Staffel%E%Folge%";