forked from markus/S_New4
v5.3.2
This commit is contained in:
parent
44950eefc9
commit
9a8f97dfe7
@ -146,7 +146,8 @@ int manageParameter(Settings &settings, int argc, char **argv)
|
||||
return -1;
|
||||
|
||||
} else if (isSame(argv, "printjdscript")) {
|
||||
return unterOption_printJD2_renameSkript(&settings,argc, argv);
|
||||
unterOption_printJD2_renameSkript(&settings,argc, argv);
|
||||
return -1;
|
||||
|
||||
} else {
|
||||
std::cout << " => Error: Invalid option '" << argv[1] << "', but not detected in compare-Function" << std::endl;
|
||||
@ -456,6 +457,8 @@ int unterOption_help(Settings &settings)
|
||||
<< "\t\"news\"\t\tModus um neusten 75 Folgen zu sehen." << std::endl
|
||||
<< "\t\"clean\"\t\tModus um Cookie-Files zu löschen." << std::endl
|
||||
<< "\t\"log\"\t\tModus um Log Datei zu sehen / leeren." << std::endl
|
||||
<< "\t\"printjdscript\"\t\tGibt Renamer-Skript für JD2 aus." << std::endl
|
||||
|
||||
<< std::endl;
|
||||
|
||||
std::cout << "Verzeichnisse:" << std::endl
|
||||
@ -901,7 +904,7 @@ void unterOption_url_help(std::string programName)
|
||||
<< " wenn diese Serie auf mehreren Seiten existiert!" << std::endl
|
||||
<< " Parameter kann auch im Default File als standart festgelegt werden!" << std::endl
|
||||
<< " Standart: Überprüfe alle Seiten" << std::endl
|
||||
<< " -s [url], --standart-page [url]" << std::endl
|
||||
<< " -s [url], --standart-page [url]" << std::endl
|
||||
<< " Mit dieser Option kann man festlegen, welche Seite für unvollständige" << std::endl
|
||||
<< " Redirect Links ( z.B. /redirect/xyz ) verwendet werden soll." << std::endl
|
||||
<< " Default: deaktiviert" << std::endl << std::endl;
|
||||
@ -1214,7 +1217,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
|
||||
std::cout << "Aufruf: " << settings->programName << " clean\n " << settings->programName << " clean --help" << std::endl << std::endl
|
||||
<< "Beschreibung:" << std::endl << " Mit dieser Unterfunktion kann man die Cookie-Dateien löschen." << std::endl << std::endl;
|
||||
return;
|
||||
}
|
||||
@ -1881,8 +1884,15 @@ int setUpInternetPages(Settings &settings, std::string optarg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int unterOption_printJD2_renameSkript(Settings *settings, int , char **)
|
||||
int unterOption_printJD2_renameSkript(Settings *settings, int argc, char ** argv)
|
||||
{
|
||||
if(argc > 2) {
|
||||
if(strncmp("--help", argv[2], strlen(argv[2])) == 0) {
|
||||
unterOption_printJD2_help(settings->programName);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << "// Settings" << std::endl
|
||||
<< "var FilePath = \"" << settings->logFilePath << "\";" << std::endl
|
||||
<< "var ReplaceWholeName = false;" << std::endl
|
||||
@ -1890,7 +1900,7 @@ int unterOption_printJD2_renameSkript(Settings *settings, int , char **)
|
||||
<< "" << std::endl
|
||||
<< "//Global Vars" << std::endl
|
||||
<< "var LinkFile = readFile(FilePath); // *Read a text file" << std::endl
|
||||
<< "var LinkFileLineArray = LinkFile.split('\n');" << std::endl
|
||||
<< "var LinkFileLineArray = LinkFile.split('\\n');" << std::endl
|
||||
<< "var myDownloadLink = getAllDownloadLinks(); // *Get a list of all downloadlinks" << std::endl
|
||||
<< "" << std::endl
|
||||
<< "" << std::endl
|
||||
@ -1921,3 +1931,17 @@ int unterOption_printJD2_renameSkript(Settings *settings, int , char **)
|
||||
<< "}" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void unterOption_printJD2_help(std::string programName)
|
||||
{
|
||||
std::cout << "Aufruf: " << programName << " printjdscript" << std::endl
|
||||
<< " " << programName << " printjdscript --help" << std::endl
|
||||
<< std::endl;
|
||||
|
||||
std::cout << "Beschreibung:" << std::endl
|
||||
<< " DieserModus gibt ein Skript für den Jdownloader2 aus," << std::endl
|
||||
<< " welches Serienfolgen automatisch mit Staffel und Folge" << std::endl
|
||||
<< " umbenennen kann. Verwenden sie dieses Skript, wenn sie" << std::endl
|
||||
<< " später die Ordner-Überprüffuktion verwenden möchten." << std::endl
|
||||
<< std::endl;
|
||||
}
|
||||
|
@ -67,15 +67,21 @@ struct PAGE {
|
||||
|
||||
|
||||
struct Settings {
|
||||
|
||||
const std::string programName = "S_New4";
|
||||
const PAGE _sto = PAGE( "https://", "s.to", "Normale_Serien", "/serien-alphabet", "/serie/stream/"),
|
||||
|
||||
//erst animes, dann alle seiten-seiten::
|
||||
const PAGE
|
||||
_anicio = PAGE( "https://" , "aniworld.to", "Animes", "/animes-alphabet", "/anime/stream/"),
|
||||
|
||||
//alle serien - seiten:
|
||||
|
||||
_sto = PAGE( "https://", "s.to", "Normale_Serien", "/serien-alphabet", "/serie/stream/"),
|
||||
_stoIP = PAGE( "http://", "190.115.18.20", "Normale_Serien", "/serien-alphabet", "/serie/stream/"),
|
||||
serienstreamto = PAGE("https://", "serienstream.to", "Normale_Serien", "/serien-alphabet", "/serie/stream/"),
|
||||
seriencam = PAGE("https://", "serien.cam", "Normale_Serien", "/serien-alphabet", "/serie/stream/"),
|
||||
seriencam = PAGE("https://", "serien.cam", "Normale_Serien", "/serien-alphabet", "/serie/stream/");
|
||||
|
||||
_anicio = PAGE( "https://" , "aniworld.to", "Animes", "/animes-alphabet", "/anime/stream/");
|
||||
const PAGE pagesALL[5] = { _sto, _anicio, _stoIP, /*_serienstreamsx,*/ seriencam, serienstreamto };
|
||||
//alle compakt
|
||||
const PAGE pagesALL[5] = { _anicio, _sto, _stoIP, /*_serienstreamsx,*/ seriencam, serienstreamto };
|
||||
|
||||
std::vector<PAGE> pagesInUse; // Priority sorted
|
||||
bool useFirstPage = false;
|
||||
@ -244,6 +250,7 @@ void unterOption_info_help(std::string programName);
|
||||
void unterOption_clean(Settings * settings, int argc, char **argv);
|
||||
|
||||
int unterOption_printJD2_renameSkript(Settings * settings, int, char **);
|
||||
void unterOption_printJD2_help(std::string programName);
|
||||
|
||||
|
||||
int unterOption_news(Settings * settings, int argc, char **argv);
|
||||
@ -258,6 +265,8 @@ void unterOption_RemoveSettings_or_CacheDire_help(std::string programName);
|
||||
int unterOption_printLogFile(Settings * settings, int argc, char **argv);
|
||||
void unterOption_printLogFile(std::string programName);
|
||||
|
||||
|
||||
|
||||
int setS5ProxytoSettings(Settings &settings, std::string optarg);
|
||||
int setUpInternetPages(Settings &settings, std::string optarg);
|
||||
|
||||
@ -274,6 +283,4 @@ int setUpInternetPages(Settings &settings, std::string optarg);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // PARAMETERMANAGER_H
|
||||
|
@ -821,8 +821,10 @@ int ProgramManager::directLinkModus(Settings *settings)
|
||||
//extrahiere redirekt und page
|
||||
std::string redL;
|
||||
PAGE page;
|
||||
if(line == "")
|
||||
continue;
|
||||
|
||||
if(line.find("/redirect/") == std::string::npos) {
|
||||
else if(line.find("/redirect/") == std::string::npos) {
|
||||
std::cout << " => Error: Invalid Redirect Link: '" << line << "'" << std::endl;
|
||||
continue;
|
||||
|
||||
@ -856,6 +858,10 @@ int ProgramManager::directLinkModus(Settings *settings)
|
||||
|
||||
AccountManager accountManager(settings->accountFilePath, settings->accountNumberPath, page, settings->pagesALL);
|
||||
|
||||
//remove all behind "
|
||||
if(redL.find("\"") != std::string::npos)
|
||||
redL.erase(redL.find("\""));
|
||||
|
||||
if(convertLink(page, redL, &accountManager, settings) != 0) {
|
||||
if(settings->debugMode)
|
||||
std::cerr << ">>> Debug In " << __FUNCTION__ << ": convert Link failed." << std::endl;
|
||||
|
Loading…
Reference in New Issue
Block a user