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;
|
||||
pos=line.find("data-lang-key=");
|
||||
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;
|
||||
}
|
||||
//entferne alles bis pos
|
||||
@ -186,12 +186,12 @@ std::string PageManager::getLinks(std::string HTML)
|
||||
|
||||
pos=line.find("data-link-id=");
|
||||
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;
|
||||
}
|
||||
pos2=line.find("href=\"");
|
||||
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;
|
||||
}
|
||||
//Entferne alles von pos bis pos2
|
||||
@ -199,12 +199,12 @@ std::string PageManager::getLinks(std::string HTML)
|
||||
|
||||
pos=line.find("target=");
|
||||
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;
|
||||
}
|
||||
pos2=line.find("title=");
|
||||
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;
|
||||
}
|
||||
//entferne alles von pos bis pos2
|
||||
@ -212,7 +212,7 @@ std::string PageManager::getLinks(std::string HTML)
|
||||
|
||||
pos=line.find("><");
|
||||
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;
|
||||
}
|
||||
//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 + "\"" ) );
|
||||
pos = Line.find("href=\"");
|
||||
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;
|
||||
}
|
||||
Line.erase(0, pos + static_cast<int>(strlen("href=\"")));
|
||||
|
||||
pos = Line.find("\"");
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ int manageParameter(Settings &settings, int argc, char **argv)
|
||||
return -1;
|
||||
|
||||
} 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;
|
||||
}
|
||||
}
|
||||
@ -356,13 +356,10 @@ int unterOption_default(Settings *settings, int argc, char ** argv)
|
||||
break;
|
||||
settings->startEpisode = atoi(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;
|
||||
} else if (settings->startEpisode == 0) {
|
||||
std::cout << "Error: -e [Folge]: StartEpisode ist 0." << std::endl;
|
||||
return 12;
|
||||
} else if (settings->startEpisode < 0) {
|
||||
std::cout << "Error: -e [Folge]: StartEpisode " << settings->startEpisode << " ist kleiner 0." << std::endl;
|
||||
} else if (settings->startEpisode <= 0) {
|
||||
std::cout << " => Error: -e [Folge]: StartEpisode " << settings->startEpisode << " ist kleiner gleich 0." << std::endl;
|
||||
return 13;
|
||||
}
|
||||
if(settings->debugMode)
|
||||
@ -373,7 +370,7 @@ int unterOption_default(Settings *settings, int argc, char ** argv)
|
||||
break;
|
||||
settings->stopEpisode = atoi(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;
|
||||
} else if (settings->debugMode)
|
||||
std::cout << "StopEpisode: " << settings->stopEpisode << std::endl;
|
||||
@ -383,10 +380,10 @@ int unterOption_default(Settings *settings, int argc, char ** argv)
|
||||
break;
|
||||
settings->startSeason = atoi(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;
|
||||
} 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;
|
||||
} else if(settings->debugMode)
|
||||
std::cout << "StartStaffel: " << settings->startSeason << std::endl;
|
||||
@ -396,7 +393,7 @@ int unterOption_default(Settings *settings, int argc, char ** argv)
|
||||
break;
|
||||
settings->stopSeason = atoi(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;
|
||||
} else if(settings->debugMode)
|
||||
std::cout << "StopSeason: " << settings->stopSeason << std::endl;
|
||||
|
@ -38,7 +38,7 @@ struct Settings {
|
||||
proxy_ip = "127.0.0.1",
|
||||
languages = "GerDub,GerSub,Eng",
|
||||
genaueHoster = "",
|
||||
version = "2.4.3",
|
||||
version = "2.4.4",
|
||||
defaultFileVersion="1.3",
|
||||
outputFilePath = "",
|
||||
default_checkPath = "",
|
||||
|
@ -351,7 +351,7 @@ int ProgramManager::searchModus(Settings *settings)
|
||||
if( res == 0)
|
||||
std::cout << "Erfolgreich geupdatet: Die Serienliste ist nun auf dem neusten Stand." << std::endl;
|
||||
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;
|
||||
|
||||
} else if(settings->name == "") {
|
||||
|
Loading…
Reference in New Issue
Block a user