forked from markus/S_New4
fix helpmenues and add hoster * ( for admins)
This commit is contained in:
parent
238f5181aa
commit
cdf03e7d86
@ -332,10 +332,12 @@ int unterOption_help(Settings &settings)
|
||||
<< std::endl;
|
||||
|
||||
std::cout << "Verzeichnisse:" << std::endl
|
||||
<< "\tOrdner zum zwischenspeichern der Cookies und der AccountNummer:" << std::endl
|
||||
<< "\t > '" << settings.cookieFilePath << "'" << std::endl
|
||||
<< "\tOrdner zum speichern der Accounts und Default-Einstellungen:" << std::endl
|
||||
<< "\t > '" << settings.defaultsFilePath << "'" << std::endl;
|
||||
<< "\tOrdner zum zwischenspeichern der Cookies, AccountNummer" << std::endl
|
||||
<< "\tund des letzten Update Datums:" << std::endl
|
||||
<< " => > '" << settings.cookieFilePath << "'" << std::endl
|
||||
<< "\tOrdner zum speichern der Accounts, Default-Einstellungen" << std::endl
|
||||
<< "\tund der Serienliste:" << std::endl
|
||||
<< " => > '" << settings.defaultsFilePath << "'" << std::endl;
|
||||
|
||||
return -1;
|
||||
}
|
||||
@ -705,10 +707,10 @@ void unterOption_url_help(std::string programName)
|
||||
std::cout << "Aufruf: " << programName << " url [OPTION]... [URL]..." << std::endl << std::endl;
|
||||
|
||||
std::cout << "Beschreibung:" << std::endl
|
||||
<< " Mit dieser Unterfunction von " << programName << " können eigene" << std::endl
|
||||
<< " Mit dieser Unterfunktion von " << programName << " können eigene" << std::endl
|
||||
<< " Redirect-Links umgewandelt werden. Beispiel:" << std::endl
|
||||
<< " https://s.to/redirect/4449825 -> http://vivo.sx/d20b111ade" << std::endl
|
||||
<< " Achtung: Achte, dass Url mit https:// nicht mit http:// beginnt." << std::endl
|
||||
<< " https://s.to/redirect/44498xy -> https://vivolvox.xy/123xy" << std::endl
|
||||
<< " Der Link kann folgen Aussehen: {[*]s.to}/redirect/[*]." << std::endl
|
||||
<< " Standartwerte können im Defaultfile geändert werden." << std::endl << std::endl;
|
||||
|
||||
std::cout << "OPTIONEN:" << std::endl
|
||||
@ -924,7 +926,7 @@ void unterOption_clean(Settings * settings, int argc, char **argv)
|
||||
if(argc > 2)
|
||||
if(strncmp("--help", argv[2], strlen(argv[2])) == 0) {
|
||||
std::cout << "Aufruf: " << settings->programName << " clean\n " << settings->programName << " clean --help" << std::endl << std::endl
|
||||
<< "Beschreibung:" << std::endl << " Mit dieser Unterfunction kann man die Cookie-Dateien löschen." << std::endl << std::endl;
|
||||
<< "Beschreibung:" << std::endl << " Mit dieser Unterfunktion kann man die Cookie-Dateien löschen." << std::endl << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1158,7 +1160,7 @@ void unterOption_news_help(std::string programName)
|
||||
std::cout << "Aufruf: " << programName << " news [OPTION]..." << std::endl << std::endl;
|
||||
|
||||
std::cout << "Beschreibung:" << std::endl
|
||||
<< " Mit dieser Unterfunktion kann man die neuesten Folgen auf s.to sehen." << std::endl << std::endl;
|
||||
<< " Mit dieser Unterfunktion kann man die neuesten 75 Folgen auf s.to sehen." << std::endl << std::endl;
|
||||
|
||||
std::cout << "OPTIONEN:" << std::endl
|
||||
<< " -p [ip:port/ip/port], --socks5-proxy [ip:port/ip/port]" << std::endl
|
||||
|
@ -50,7 +50,7 @@ struct Settings {
|
||||
proxy_ip = "127.0.0.1",
|
||||
languages = "GerDub,GerSub,Eng",
|
||||
genaueHoster = "",
|
||||
version = "3.0.2",
|
||||
version = "3.0.3",
|
||||
defaultFileVersion="1.6",
|
||||
outputFilePath = "",
|
||||
default_checkPath = "",
|
||||
|
@ -344,12 +344,34 @@ int ProgramManager::defaultModus(Settings *settings)
|
||||
if(tmp_reply.html == "-1")
|
||||
return 50;
|
||||
std::string allLinks = pageManager.getLinks(tmp_reply.html);
|
||||
if(settings->genaueHoster == "*," && settings->debugMode) {
|
||||
if(settings->debugMode)
|
||||
std::cout << allLinks << std::endl;
|
||||
std::stringstream strstrem(allLinks);
|
||||
std::string line;
|
||||
while (std::getline(strstrem, line).good()) {
|
||||
size_t pos = line.find("/redirect/");
|
||||
if(pos == std::string::npos) {
|
||||
std::cout << " => Error: Konnte den Redirect Link in der Zeile aus LinksListe nicht finden." << std::endl;
|
||||
return 400;
|
||||
} else
|
||||
line.erase(0, pos);
|
||||
line.erase(line.find("\""));
|
||||
if(convertLink(line, &accountManager, settings, staffel, folge, allLinks) != 0)
|
||||
return 51;
|
||||
}
|
||||
//Stop beacause same episode every account can only 2 videos not 10-12
|
||||
return 0;
|
||||
|
||||
} else {
|
||||
std::string Link = pageManager.chooseHosterLink(allLinks, settings->genaueHoster, settings->languages);
|
||||
|
||||
if(settings->debugMode)
|
||||
std::cout << allLinks << std::endl << ( (Link == "") ? "" : " -> Link: 'https://s.to") << Link << ( (Link == "") ? "" : "'\n" );
|
||||
if(convertLink(Link, &accountManager, settings, staffel, folge, allLinks) != 0)
|
||||
return 51;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user