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::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;
|
||||
size_t pos = 0;
|
||||
@ -473,6 +472,9 @@ std::string PageManager::chooseHosterLink(std::string HosterList, std::string Ho
|
||||
|
||||
//Für jede Sprache:
|
||||
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 == "")
|
||||
continue;
|
||||
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;
|
||||
continue;
|
||||
}
|
||||
Line = grep(LanguageSortedHoster, ("hoster=\"" + hoster + "\"" ) );
|
||||
Line = grep(LanguageSortedHoster + "\n", ("hoster=\"" + hoster + "\"" ) );
|
||||
pos = Line.find("href=\"");
|
||||
if(pos == std::string::npos) {
|
||||
std::cout << " => Error: Konnte 'href=\"' in chooseHosterLink() nicht finden." << std::endl;
|
||||
|
@ -81,7 +81,7 @@ struct Settings {
|
||||
proxy_ip = "127.0.0.1",
|
||||
languages = "GerDub,GerSub,Eng,",
|
||||
genaueHoster = "",
|
||||
version = "3.7.4",
|
||||
version = "3.7.5",
|
||||
defaultFileVersion="1.7",
|
||||
outputFilePath = "",
|
||||
default_checkPath = "",
|
||||
|
Loading…
Reference in New Issue
Block a user