Filter out titles not in English or Japanese from media cards
This commit is contained in:
parent
1d022bc8ae
commit
5102c7c459
@ -263,8 +263,15 @@ final class Kitsu {
|
|||||||
|
|
||||||
if (array_key_exists('localized', $titles) && is_array($titles['localized']))
|
if (array_key_exists('localized', $titles) && is_array($titles['localized']))
|
||||||
{
|
{
|
||||||
foreach($titles['localized'] as $alternateTitle)
|
foreach($titles['localized'] as $locale => $alternateTitle)
|
||||||
{
|
{
|
||||||
|
// Really don't care about languages that aren't english
|
||||||
|
// or Japanese for titles
|
||||||
|
if ( ! in_array($locale, ['en', 'en_us', 'en_jp', 'ja_jp']))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (self::titleIsUnique($alternateTitle, $valid))
|
if (self::titleIsUnique($alternateTitle, $valid))
|
||||||
{
|
{
|
||||||
$valid[] = $alternateTitle;
|
$valid[] = $alternateTitle;
|
||||||
|
Loading…
Reference in New Issue
Block a user