forked from markus/S_New4
v3.5.5: extra return value -2 bei checkName, -2 != -1, -1 name error, -2 download error, stoppe bei -2 immer sofort
This commit is contained in:
parent
6216ee60c0
commit
debe9f7bd1
@ -228,7 +228,7 @@ std::string PageManager::checkName(std::string Name)
|
||||
std::cout << "\33[2K\r => Error: Ungültiger Name: '" << Name << "'" << std::endl;
|
||||
return "-1";
|
||||
} else if (html == "-1" || html == "") {
|
||||
return "-1";
|
||||
return "-2";
|
||||
}
|
||||
else {
|
||||
std::cout << "\33[2K\r > Name: " << name << std::endl;
|
||||
|
@ -63,7 +63,7 @@ struct Settings {
|
||||
proxy_ip = "127.0.0.1",
|
||||
languages = "GerDub,GerSub,Eng,",
|
||||
genaueHoster = "",
|
||||
version = "3.5.4",
|
||||
version = "3.5.5",
|
||||
defaultFileVersion="1.6",
|
||||
outputFilePath = "",
|
||||
default_checkPath = "",
|
||||
|
@ -277,7 +277,10 @@ int ProgramManager::sucheNach_1_Serien(Settings *settings, PageManager &pageMana
|
||||
}
|
||||
|
||||
//Überprüfe ob es die serie gibt wenn ja speicher ihn in newname und beende Function
|
||||
if ( (newName = pageManager.checkName(finds)) == "-1") {
|
||||
newName = pageManager.checkName(finds);
|
||||
if(newName == "-2")
|
||||
return 23;
|
||||
else if( newName == "-1" ) {
|
||||
std::cout << " => Error: Konnte die von der Suche vorgeschlagene Serie nicht finden." << std::endl;
|
||||
if(settings->debugMode)
|
||||
std::cerr << ">>> Debug In " << __FUNCTION__ << ": Extracted Name from searchModus is invalid." << std::endl;
|
||||
@ -368,7 +371,9 @@ int ProgramManager::defaultModus(Settings *settings)
|
||||
|
||||
//Führe Function aus, die überprüft ob die serie existiert
|
||||
std::string nameInUrl =pageManager.checkName(settings->name);
|
||||
if(nameInUrl == "-1") {
|
||||
if(nameInUrl == "-2")
|
||||
return 67;
|
||||
else if(nameInUrl == "-1") {
|
||||
//Wenn nicht, dann fühe noch eine Suche nach ähnlichen durch && Wenn nur 1ne dacnn frag ob es diese ist.
|
||||
if( sucheNach_1_Serien(settings, pageManager, nameInUrl) != 0) {
|
||||
if(settings->debugMode)
|
||||
@ -725,7 +730,9 @@ int ProgramManager::infoModus(Settings *settings)
|
||||
|
||||
//Führe Function aus, die überprüft ob die serie existiert
|
||||
std::string nameInUrl = pageManager.checkName(settings->name);
|
||||
if(nameInUrl == "-1") {
|
||||
if(nameInUrl == "-2")
|
||||
return 145;
|
||||
else if(nameInUrl == "-1") {
|
||||
//Wenn nicht, dann fühe noch eine Suche nach ähnlichen durch.
|
||||
if( sucheNach_1_Serien(settings, pageManager, nameInUrl) != 0) {
|
||||
if(settings->debugMode)
|
||||
|
Loading…
Reference in New Issue
Block a user