forked from markus/S_New4
v2.3.2
This commit is contained in:
parent
fa77193d79
commit
81d4a9f6f4
@ -37,7 +37,7 @@ struct Settings {
|
|||||||
proxy_ip = "127.0.0.1",
|
proxy_ip = "127.0.0.1",
|
||||||
languages = "GerDub,GerSub,Eng",
|
languages = "GerDub,GerSub,Eng",
|
||||||
genaueHoster = "Vivo,GoUnlimited",
|
genaueHoster = "Vivo,GoUnlimited",
|
||||||
version = "2.3.1",
|
version = "2.3.2",
|
||||||
defaultFileVersion="1.3",
|
defaultFileVersion="1.3",
|
||||||
outputFilePath = "",
|
outputFilePath = "",
|
||||||
default_checkDirPath = "",
|
default_checkDirPath = "",
|
||||||
|
@ -111,6 +111,24 @@ void * threadFunction(void * data) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ProgramManager::waitForThreads()
|
||||||
|
{
|
||||||
|
for( auto &e : threadList) {
|
||||||
|
if( e->exitState != -1 && pthread_join(e->thread, nullptr) == 0) {
|
||||||
|
if(e->exitState != 0) {
|
||||||
|
std::cout << "\33[2K\r => Error: Thread gab error zurück." << std::endl;
|
||||||
|
return e->exitState;
|
||||||
|
} else
|
||||||
|
if(e->returnValue != "")
|
||||||
|
std::cout << ("\33[2K\r(T" + std::to_string(e->id) + ")" + e->returnValue ) << std::endl;
|
||||||
|
}
|
||||||
|
e->exitState = -1;
|
||||||
|
e->returnValue = "";
|
||||||
|
e->setData(0, 0);
|
||||||
|
e->thread = 0;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int ProgramManager::defaultModus(Settings *settings)
|
int ProgramManager::defaultModus(Settings *settings)
|
||||||
{
|
{
|
||||||
@ -296,26 +314,6 @@ int ProgramManager::defaultModus(Settings *settings)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ProgramManager::waitForThreads()
|
|
||||||
{
|
|
||||||
for( auto &e : threadList) {
|
|
||||||
if( e->exitState != -1 && pthread_join(e->thread, nullptr) == 0) {
|
|
||||||
if(e->exitState != 0) {
|
|
||||||
std::cout << "\33[2K\r => Error: Thread gab error zurück." << std::endl;
|
|
||||||
return e->exitState;
|
|
||||||
} else
|
|
||||||
if(e->returnValue != "")
|
|
||||||
std::cout << ("\33[2K\r(T" + std::to_string(e->id) + ")" + e->returnValue ) << std::endl;
|
|
||||||
}
|
|
||||||
e->exitState = -1;
|
|
||||||
e->returnValue = "";
|
|
||||||
e->setData(0, 0);
|
|
||||||
e->thread = 0;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int ProgramManager::directLinkModus(Settings *settings)
|
int ProgramManager::directLinkModus(Settings *settings)
|
||||||
{
|
{
|
||||||
AccountManager accountManager(settings->accountFilePath, settings->accountNumberPath);
|
AccountManager accountManager(settings->accountFilePath, settings->accountNumberPath);
|
||||||
@ -451,6 +449,8 @@ int ProgramManager::infoModus(Settings *settings)
|
|||||||
return 40;
|
return 40;
|
||||||
std::cout << " > Die Staffel " << staffel << " hat " << pageManager.counterContains(tmp_reply.html, "/episode-%i") << " Folge(n)." << std::endl;
|
std::cout << " > Die Staffel " << staffel << " hat " << pageManager.counterContains(tmp_reply.html, "/episode-%i") << " Folge(n)." << std::endl;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Datum & FSK
|
//Datum & FSK
|
||||||
@ -463,6 +463,7 @@ int ProgramManager::infoModus(Settings *settings)
|
|||||||
std::string startStopDates[2];
|
std::string startStopDates[2];
|
||||||
size_t pos = 0, pos2 = 0;
|
size_t pos = 0, pos2 = 0;
|
||||||
|
|
||||||
|
//Date
|
||||||
for (int i = 0; i < 2; ++i) {
|
for (int i = 0; i < 2; ++i) {
|
||||||
if( (pos = line.find("href=")) == std::string::npos ) {
|
if( (pos = line.find("href=")) == std::string::npos ) {
|
||||||
std::cout << " => Error: Konnte 'href=' nicht finden." << std::endl;
|
std::cout << " => Error: Konnte 'href=' nicht finden." << std::endl;
|
||||||
@ -480,6 +481,7 @@ int ProgramManager::infoModus(Settings *settings)
|
|||||||
startStopDates[i] = line.substr(pos + 1, pos2 - pos -1);
|
startStopDates[i] = line.substr(pos + 1, pos2 - pos -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//FSK
|
||||||
if( (pos = line.find("data-fsk=\"")) == std::string::npos ) {
|
if( (pos = line.find("data-fsk=\"")) == std::string::npos ) {
|
||||||
std::cout << " => Error: Konnte 'data-fsk=\"' nicht finden." << std::endl;
|
std::cout << " => Error: Konnte 'data-fsk=\"' nicht finden." << std::endl;
|
||||||
return 87;
|
return 87;
|
||||||
|
Loading…
Reference in New Issue
Block a user