forked from markus/S_New4
v2.4.4
This commit is contained in:
parent
48304a4d58
commit
88196f055f
@ -178,7 +178,7 @@ std::string PageManager::getLinks(std::string HTML)
|
|||||||
break;
|
break;
|
||||||
pos=line.find("data-lang-key=");
|
pos=line.find("data-lang-key=");
|
||||||
if(pos == std::string::npos) {
|
if(pos == std::string::npos) {
|
||||||
std::cout << "Error: Konnte Position von \"data-lang-key=\" nicht finden." << std::endl;
|
std::cout << " => Error: Konnte Position von \"data-lang-key=\" nicht finden." << std::endl;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//entferne alles bis pos
|
//entferne alles bis pos
|
||||||
@ -186,12 +186,12 @@ std::string PageManager::getLinks(std::string HTML)
|
|||||||
|
|
||||||
pos=line.find("data-link-id=");
|
pos=line.find("data-link-id=");
|
||||||
if(pos == std::string::npos) {
|
if(pos == std::string::npos) {
|
||||||
std::cout << "Error: Konnte Position von \"data-link-id=\" nicht finden." << std::endl;
|
std::cout << " => Error: Konnte Position von \"data-link-id=\" nicht finden." << std::endl;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
pos2=line.find("href=\"");
|
pos2=line.find("href=\"");
|
||||||
if(pos2 == std::string::npos) {
|
if(pos2 == std::string::npos) {
|
||||||
std::cout << "Error: Konnte Position von 'href=\"' nicht finden." << std::endl;
|
std::cout << " => Error: Konnte Position von 'href=\"' nicht finden." << std::endl;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//Entferne alles von pos bis pos2
|
//Entferne alles von pos bis pos2
|
||||||
@ -199,12 +199,12 @@ std::string PageManager::getLinks(std::string HTML)
|
|||||||
|
|
||||||
pos=line.find("target=");
|
pos=line.find("target=");
|
||||||
if(pos == std::string::npos) {
|
if(pos == std::string::npos) {
|
||||||
std::cout << "Error: Konnte Position von \"target=\" nicht finden." << std::endl;
|
std::cout << " => Error: Konnte Position von \"target=\" nicht finden." << std::endl;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
pos2=line.find("title=");
|
pos2=line.find("title=");
|
||||||
if(pos2 == std::string::npos) {
|
if(pos2 == std::string::npos) {
|
||||||
std::cout << "Error: Konnte Position von \"title=\" nicht finden." << std::endl;
|
std::cout << " => Error: Konnte Position von \"title=\" nicht finden." << std::endl;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//entferne alles von pos bis pos2
|
//entferne alles von pos bis pos2
|
||||||
@ -212,7 +212,7 @@ std::string PageManager::getLinks(std::string HTML)
|
|||||||
|
|
||||||
pos=line.find("><");
|
pos=line.find("><");
|
||||||
if(pos == std::string::npos) {
|
if(pos == std::string::npos) {
|
||||||
std::cout << "Error: Konnte Position von \"><\" nicht finden." << std::endl;
|
std::cout << " => Error: Konnte Position von \"><\" nicht finden." << std::endl;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//entferne alles von pos bis zum ende
|
//entferne alles von pos bis zum ende
|
||||||
@ -324,14 +324,14 @@ std::string PageManager::chooseHosterLink(std::string HosterList, std::string Ho
|
|||||||
Line = grep(LanguageSortedHoster, ("hoster=\"" + hoster + "\"" ) );
|
Line = grep(LanguageSortedHoster, ("hoster=\"" + hoster + "\"" ) );
|
||||||
pos = Line.find("href=\"");
|
pos = Line.find("href=\"");
|
||||||
if(pos == std::string::npos) {
|
if(pos == std::string::npos) {
|
||||||
std::cout << "Error: Konnte 'href=\"' in chooseHosterLink() nicht finden." << std::endl;
|
std::cout << " => Error: Konnte 'href=\"' in chooseHosterLink() nicht finden." << std::endl;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Line.erase(0, pos + static_cast<int>(strlen("href=\"")));
|
Line.erase(0, pos + static_cast<int>(strlen("href=\"")));
|
||||||
|
|
||||||
pos = Line.find("\"");
|
pos = Line.find("\"");
|
||||||
if(pos == std::string::npos) {
|
if(pos == std::string::npos) {
|
||||||
std::cout << "Error: Konnte '\"' in chooseHosterLink() nicht finden." << std::endl;
|
std::cout << " => Error: Konnte '\"' in chooseHosterLink() nicht finden." << std::endl;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ int manageParameter(Settings &settings, int argc, char **argv)
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
std::cout << "Error: Invalid option " << argv[1] << ", but not detected in compare-Function" << std::endl;
|
std::cout << " => Error: Invalid option " << argv[1] << ", but not detected in compare-Function" << std::endl;
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -356,13 +356,10 @@ int unterOption_default(Settings *settings, int argc, char ** argv)
|
|||||||
break;
|
break;
|
||||||
settings->startEpisode = atoi(optarg);
|
settings->startEpisode = atoi(optarg);
|
||||||
if (std::to_string(settings->startEpisode) != optarg) {
|
if (std::to_string(settings->startEpisode) != optarg) {
|
||||||
std::cout << "Error: -e [Folge]: '" << optarg << "' ist keine Zahl." << std::endl;
|
std::cout << " => Error: -e [Folge]: '" << optarg << "' ist keine Zahl." << std::endl;
|
||||||
return 11;
|
return 11;
|
||||||
} else if (settings->startEpisode == 0) {
|
} else if (settings->startEpisode <= 0) {
|
||||||
std::cout << "Error: -e [Folge]: StartEpisode ist 0." << std::endl;
|
std::cout << " => Error: -e [Folge]: StartEpisode " << settings->startEpisode << " ist kleiner gleich 0." << std::endl;
|
||||||
return 12;
|
|
||||||
} else if (settings->startEpisode < 0) {
|
|
||||||
std::cout << "Error: -e [Folge]: StartEpisode " << settings->startEpisode << " ist kleiner 0." << std::endl;
|
|
||||||
return 13;
|
return 13;
|
||||||
}
|
}
|
||||||
if(settings->debugMode)
|
if(settings->debugMode)
|
||||||
@ -373,7 +370,7 @@ int unterOption_default(Settings *settings, int argc, char ** argv)
|
|||||||
break;
|
break;
|
||||||
settings->stopEpisode = atoi(optarg);
|
settings->stopEpisode = atoi(optarg);
|
||||||
if (std::to_string(settings->stopEpisode) != optarg) {
|
if (std::to_string(settings->stopEpisode) != optarg) {
|
||||||
std::cout << "Error: -E [Folge]: '" << optarg << "' ist keine Zahl." << std::endl;
|
std::cout << " => Error: -E [Folge]: '" << optarg << "' ist keine Zahl." << std::endl;
|
||||||
return 14;
|
return 14;
|
||||||
} else if (settings->debugMode)
|
} else if (settings->debugMode)
|
||||||
std::cout << "StopEpisode: " << settings->stopEpisode << std::endl;
|
std::cout << "StopEpisode: " << settings->stopEpisode << std::endl;
|
||||||
@ -383,10 +380,10 @@ int unterOption_default(Settings *settings, int argc, char ** argv)
|
|||||||
break;
|
break;
|
||||||
settings->startSeason = atoi(optarg);
|
settings->startSeason = atoi(optarg);
|
||||||
if (std::to_string(settings->startSeason) != optarg) {
|
if (std::to_string(settings->startSeason) != optarg) {
|
||||||
std::cout << "Error: -s [Staffel]: '" << optarg << "' ist keine Zahl." << std::endl;
|
std::cout << " => Error: -s [Staffel]: '" << optarg << "' ist keine Zahl." << std::endl;
|
||||||
return 15;
|
return 15;
|
||||||
} else if (settings->startSeason < 0) {
|
} else if (settings->startSeason < 0) {
|
||||||
std::cout << "Error: -s [Staffel]: StartStaffel " << settings->startSeason << " ist kleiner 0." << std::endl;
|
std::cout << " => Error: -s [Staffel]: StartStaffel " << settings->startSeason << " ist kleiner 0." << std::endl;
|
||||||
return 17;
|
return 17;
|
||||||
} else if(settings->debugMode)
|
} else if(settings->debugMode)
|
||||||
std::cout << "StartStaffel: " << settings->startSeason << std::endl;
|
std::cout << "StartStaffel: " << settings->startSeason << std::endl;
|
||||||
@ -396,7 +393,7 @@ int unterOption_default(Settings *settings, int argc, char ** argv)
|
|||||||
break;
|
break;
|
||||||
settings->stopSeason = atoi(optarg);
|
settings->stopSeason = atoi(optarg);
|
||||||
if (std::to_string(settings->stopSeason) != optarg) {
|
if (std::to_string(settings->stopSeason) != optarg) {
|
||||||
std::cout << "Error: -S [Staffel]: '" << optarg << "' ist keine Zahl." << std::endl;
|
std::cout << " => Error: -S [Staffel]: '" << optarg << "' ist keine Zahl." << std::endl;
|
||||||
return 18;
|
return 18;
|
||||||
} else if(settings->debugMode)
|
} else if(settings->debugMode)
|
||||||
std::cout << "StopSeason: " << settings->stopSeason << std::endl;
|
std::cout << "StopSeason: " << settings->stopSeason << std::endl;
|
||||||
|
@ -38,7 +38,7 @@ struct Settings {
|
|||||||
proxy_ip = "127.0.0.1",
|
proxy_ip = "127.0.0.1",
|
||||||
languages = "GerDub,GerSub,Eng",
|
languages = "GerDub,GerSub,Eng",
|
||||||
genaueHoster = "",
|
genaueHoster = "",
|
||||||
version = "2.4.3",
|
version = "2.4.4",
|
||||||
defaultFileVersion="1.3",
|
defaultFileVersion="1.3",
|
||||||
outputFilePath = "",
|
outputFilePath = "",
|
||||||
default_checkPath = "",
|
default_checkPath = "",
|
||||||
|
@ -351,7 +351,7 @@ int ProgramManager::searchModus(Settings *settings)
|
|||||||
if( res == 0)
|
if( res == 0)
|
||||||
std::cout << "Erfolgreich geupdatet: Die Serienliste ist nun auf dem neusten Stand." << std::endl;
|
std::cout << "Erfolgreich geupdatet: Die Serienliste ist nun auf dem neusten Stand." << std::endl;
|
||||||
else
|
else
|
||||||
std::cout << "Error: Das updaten der Serienliste ist fehlgeschlagen." << std::endl;
|
std::cout << " => Error: Das updaten der Serienliste ist fehlgeschlagen." << std::endl;
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
} else if(settings->name == "") {
|
} else if(settings->name == "") {
|
||||||
|
Loading…
Reference in New Issue
Block a user