forked from markus/S_New4
v3.7.5: fix big error: when no link for the first langue was found error at the other languages: no reset istringstream
This commit is contained in:
parent
2be77bd2ca
commit
c8a7f54766
@ -464,7 +464,6 @@ int PageManager::writeToFile(std::string path, std::string text)
|
|||||||
std::string PageManager::chooseHosterLink(std::string HosterList, std::string Hoster_with_Highst_Priority_at_First, std::string languages_with_highst_priority_at_first)
|
std::string PageManager::chooseHosterLink(std::string HosterList, std::string Hoster_with_Highst_Priority_at_First, std::string languages_with_highst_priority_at_first)
|
||||||
{
|
{
|
||||||
std::istringstream SListLang ( replace( languages_with_highst_priority_at_first, ",", "\n") + "\n" );
|
std::istringstream SListLang ( replace( languages_with_highst_priority_at_first, ",", "\n") + "\n" );
|
||||||
std::istringstream SListHoster( replace( Hoster_with_Highst_Priority_at_First, ",", "\n") + "\n" );
|
|
||||||
|
|
||||||
int LangId = 0;
|
int LangId = 0;
|
||||||
size_t pos = 0;
|
size_t pos = 0;
|
||||||
@ -473,6 +472,9 @@ std::string PageManager::chooseHosterLink(std::string HosterList, std::string Ho
|
|||||||
|
|
||||||
//Für jede Sprache:
|
//Für jede Sprache:
|
||||||
while (getline(SListLang, langId).good()) {
|
while (getline(SListLang, langId).good()) {
|
||||||
|
//Erst in schleife: weil es sonst ein problem wegen dem readdevice beim 2.ten durchlauf gibt
|
||||||
|
std::istringstream SListHoster( replace( Hoster_with_Highst_Priority_at_First, ",", "\n") + "\n" );
|
||||||
|
|
||||||
if(langId == "")
|
if(langId == "")
|
||||||
continue;
|
continue;
|
||||||
else if ( langId == "GerDub" )
|
else if ( langId == "GerDub" )
|
||||||
@ -501,7 +503,7 @@ std::string PageManager::chooseHosterLink(std::string HosterList, std::string Ho
|
|||||||
//std::cout << "Hoster " << hoster << " gibt es bei der sprache" << langId << " nicht " << std::endl;
|
//std::cout << "Hoster " << hoster << " gibt es bei der sprache" << langId << " nicht " << std::endl;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Line = grep(LanguageSortedHoster, ("hoster=\"" + hoster + "\"" ) );
|
Line = grep(LanguageSortedHoster + "\n", ("hoster=\"" + hoster + "\"" ) );
|
||||||
pos = Line.find("href=\"");
|
pos = Line.find("href=\"");
|
||||||
if(pos == std::string::npos) {
|
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;
|
||||||
|
@ -81,7 +81,7 @@ struct Settings {
|
|||||||
proxy_ip = "127.0.0.1",
|
proxy_ip = "127.0.0.1",
|
||||||
languages = "GerDub,GerSub,Eng,",
|
languages = "GerDub,GerSub,Eng,",
|
||||||
genaueHoster = "",
|
genaueHoster = "",
|
||||||
version = "3.7.4",
|
version = "3.7.5",
|
||||||
defaultFileVersion="1.7",
|
defaultFileVersion="1.7",
|
||||||
outputFilePath = "",
|
outputFilePath = "",
|
||||||
default_checkPath = "",
|
default_checkPath = "",
|
||||||
|
Loading…
Reference in New Issue
Block a user