Tweak handling of alternate titles, to ensure the +1 button is always usable

This commit is contained in:
Timothy Warren 2017-04-07 16:44:27 -04:00
parent ed4f9152d4
commit 555de3d17b

View File

@ -219,11 +219,11 @@ class Kitsu {
foreach($existingTitles as $existing)
{
$isSubset = stripos($existing, $title) !== FALSE;
$isSubset = mb_stripos($existing, $title) !== FALSE;
$diff = levenshtein($existing, $title);
$onlydifferentCase = (mb_strtolower($existing) === mb_strtolower($title));
if ($diff < 3 OR $isSubset OR $onlydifferentCase)
if ($diff <= 3 OR $isSubset OR $onlydifferentCase OR mb_strlen($title) > 55)
{
return FALSE;
}