Version 5.1 - All the GraphQL #32

Closed
timw4mail wants to merge 1160 commits from develop into master
Showing only changes of commit 12c9fc1b2e - Show all commits

View File

@ -413,7 +413,7 @@ final class SyncLists extends BaseCommand {
$malIds = array_keys($anilistList); $malIds = array_keys($anilistList);
$kitsuMalIds = array_map('intval', array_column($kitsuList, 'malId')); $kitsuMalIds = array_map('intval', array_column($kitsuList, 'malId'));
$missingMalIds = array_filter(array_diff($kitsuMalIds, $malIds), fn ($id) => ! in_array($id, $kitsuMalIds)); $missingMalIds = array_filter($malIds, fn ($id) => ! in_array($id, $kitsuMalIds));
// Add items on Anilist, but not Kitsu to Kitsu // Add items on Anilist, but not Kitsu to Kitsu
foreach($missingMalIds as $mid) foreach($missingMalIds as $mid)
@ -747,7 +747,7 @@ final class SyncLists extends BaseCommand {
$responseData = Json::decode($response); $responseData = Json::decode($response);
$id = $itemsToUpdate[$key]['id']; $id = $itemsToUpdate[$key]['id'];
$mal_id = $itemsToUpdate[$key]['mal_id']; $mal_id = $itemsToUpdate[$key]['mal_id'] ?? NULL;
if ( ! array_key_exists('errors', $responseData)) if ( ! array_key_exists('errors', $responseData))
{ {
$verb = ($action === SyncAction::UPDATE) ? 'updated' : 'created'; $verb = ($action === SyncAction::UPDATE) ? 'updated' : 'created';