1
1
Fork 1

Catch errors when mapping MAL ids on sync
timw4mail/HummingBirdAnimeClient/develop This commit looks good Details

Dieser Commit ist enthalten in:
Timothy Warren 2019-10-08 19:59:47 -04:00
Ursprung 848f667626
Commit fec671e3cd
1 geänderte Dateien mit 6 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -269,12 +269,17 @@ final class Model
*/
private function getMediaIdFromMalId(string $malId, string $type = 'ANIME'): ?string
{
if ($malId === '')
{
return NULL;
}
$info = $this->runQuery('MediaIdByMalId', [
'id' => $malId,
'type' => mb_strtoupper($type),
]);
if (empty($info) || empty($info['data']))
if (array_key_exists('errors', $info))
{
return NULL;
}