forked from markus/S_New4
fixes
This commit is contained in:
parent
08a4b054e1
commit
ea246e18d0
@ -1040,16 +1040,20 @@ int ProgramManager::searchModus(Settings *settings, std::string *saveTo, bool no
|
|||||||
size_t ind_3 = line.find("|", ind_2 + 1);
|
size_t ind_3 = line.find("|", ind_2 + 1);
|
||||||
if(ind_3 == std::string::npos)
|
if(ind_3 == std::string::npos)
|
||||||
continue;
|
continue;
|
||||||
if(allUrlsInUSe.find( line.substr(ind_3 + 1) ) == std::string::npos) {
|
|
||||||
on_other_sites = true;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
std::string name_correct_upper = pageManager.upper_string( line.substr(ind_2 + 1, ind_3 - ind_2 - 1));
|
std::string name_correct_upper = pageManager.upper_string( line.substr(ind_2 + 1, ind_3 - ind_2 - 1));
|
||||||
|
|
||||||
// Mindestens erlaubte Entfernung: 2, wenn name länger als 12: length / 5, ab l=20: max 5;
|
// Mindestens erlaubte Entfernung: 2, wenn name länger als 12: length / 5, ab l=20: max 5;
|
||||||
if(levenshtein_distance(name_correct_upper, upper_name) <= std::min( std::max( (int)(name_correct_upper.length() / 5), 2),
|
if(levenshtein_distance(name_correct_upper, upper_name) <= std::min( std::max( (int)(name_correct_upper.length() / 5), 2),
|
||||||
5))
|
6))
|
||||||
finds += line + "\n";
|
{
|
||||||
|
if(allUrlsInUSe.find( line.substr(ind_3 + 1) ) == std::string::npos) {
|
||||||
|
on_other_sites = true;
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
finds += line + "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(finds.size() >= 1)
|
if(finds.size() >= 1)
|
||||||
finds.pop_back();
|
finds.pop_back();
|
||||||
|
Loading…
Reference in New Issue
Block a user