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;
|
return -1;
|
||||||
|
|
||||||
} else if (isSame(argv, "printjdscript")) {
|
} else if (isSame(argv, "printjdscript")) {
|
||||||
return unterOption_printJD2_renameSkript(&settings,argc, argv);
|
unterOption_printJD2_renameSkript(&settings,argc, argv);
|
||||||
|
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;
|
||||||
@ -456,6 +457,8 @@ int unterOption_help(Settings &settings)
|
|||||||
<< "\t\"news\"\t\tModus um neusten 75 Folgen zu sehen." << std::endl
|
<< "\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\"clean\"\t\tModus um Cookie-Files zu löschen." << std::endl
|
||||||
<< "\t\"log\"\t\tModus um Log Datei zu sehen / leeren." << 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::endl;
|
||||||
|
|
||||||
std::cout << "Verzeichnisse:" << std::endl
|
std::cout << "Verzeichnisse:" << std::endl
|
||||||
@ -1881,8 +1884,15 @@ int setUpInternetPages(Settings &settings, std::string optarg)
|
|||||||
return 0;
|
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
|
std::cout << "// Settings" << std::endl
|
||||||
<< "var FilePath = \"" << settings->logFilePath << "\";" << std::endl
|
<< "var FilePath = \"" << settings->logFilePath << "\";" << std::endl
|
||||||
<< "var ReplaceWholeName = false;" << std::endl
|
<< "var ReplaceWholeName = false;" << std::endl
|
||||||
@ -1890,7 +1900,7 @@ int unterOption_printJD2_renameSkript(Settings *settings, int , char **)
|
|||||||
<< "" << std::endl
|
<< "" << std::endl
|
||||||
<< "//Global Vars" << std::endl
|
<< "//Global Vars" << std::endl
|
||||||
<< "var LinkFile = readFile(FilePath); // *Read a text file" << 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
|
<< "var myDownloadLink = getAllDownloadLinks(); // *Get a list of all downloadlinks" << std::endl
|
||||||
<< "" << std::endl
|
<< "" << std::endl
|
||||||
<< "" << std::endl
|
<< "" << std::endl
|
||||||
@ -1921,3 +1931,17 @@ int unterOption_printJD2_renameSkript(Settings *settings, int , char **)
|
|||||||
<< "}" << std::endl;
|
<< "}" << std::endl;
|
||||||
return 0;
|
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 {
|
struct Settings {
|
||||||
|
|
||||||
const std::string programName = "S_New4";
|
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/"),
|
_stoIP = PAGE( "http://", "190.115.18.20", "Normale_Serien", "/serien-alphabet", "/serie/stream/"),
|
||||||
serienstreamto = PAGE("https://", "serienstream.to", "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/");
|
//alle compakt
|
||||||
const PAGE pagesALL[5] = { _sto, _anicio, _stoIP, /*_serienstreamsx,*/ seriencam, serienstreamto };
|
const PAGE pagesALL[5] = { _anicio, _sto, _stoIP, /*_serienstreamsx,*/ seriencam, serienstreamto };
|
||||||
|
|
||||||
std::vector<PAGE> pagesInUse; // Priority sorted
|
std::vector<PAGE> pagesInUse; // Priority sorted
|
||||||
bool useFirstPage = false;
|
bool useFirstPage = false;
|
||||||
@ -244,6 +250,7 @@ void unterOption_info_help(std::string programName);
|
|||||||
void unterOption_clean(Settings * settings, int argc, char **argv);
|
void unterOption_clean(Settings * settings, int argc, char **argv);
|
||||||
|
|
||||||
int unterOption_printJD2_renameSkript(Settings * settings, int, char **);
|
int unterOption_printJD2_renameSkript(Settings * settings, int, char **);
|
||||||
|
void unterOption_printJD2_help(std::string programName);
|
||||||
|
|
||||||
|
|
||||||
int unterOption_news(Settings * settings, int argc, char **argv);
|
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);
|
int unterOption_printLogFile(Settings * settings, int argc, char **argv);
|
||||||
void unterOption_printLogFile(std::string programName);
|
void unterOption_printLogFile(std::string programName);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int setS5ProxytoSettings(Settings &settings, std::string optarg);
|
int setS5ProxytoSettings(Settings &settings, std::string optarg);
|
||||||
int setUpInternetPages(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
|
#endif // PARAMETERMANAGER_H
|
||||||
|
@ -821,8 +821,10 @@ int ProgramManager::directLinkModus(Settings *settings)
|
|||||||
//extrahiere redirekt und page
|
//extrahiere redirekt und page
|
||||||
std::string redL;
|
std::string redL;
|
||||||
PAGE page;
|
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;
|
std::cout << " => Error: Invalid Redirect Link: '" << line << "'" << std::endl;
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -856,6 +858,10 @@ int ProgramManager::directLinkModus(Settings *settings)
|
|||||||
|
|
||||||
AccountManager accountManager(settings->accountFilePath, settings->accountNumberPath, page, settings->pagesALL);
|
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(convertLink(page, redL, &accountManager, settings) != 0) {
|
||||||
if(settings->debugMode)
|
if(settings->debugMode)
|
||||||
std::cerr << ">>> Debug In " << __FUNCTION__ << ": convert Link failed." << std::endl;
|
std::cerr << ">>> Debug In " << __FUNCTION__ << ": convert Link failed." << std::endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user