Version 5.1 - All the GraphQL #32
@ -18,7 +18,7 @@ namespace Aviat\EasyMin;
|
||||
|
||||
use function Amp\wait;
|
||||
use Amp\Artax\{Client, FormBody, Request};
|
||||
use Aviat\Ion\Json;
|
||||
use Aviat\Ion\{Json, JsonException};
|
||||
|
||||
// Include Amp and Artax
|
||||
require_once('../vendor/autoload.php');
|
||||
@ -121,7 +121,7 @@ class JSMin {
|
||||
|
||||
$request = (new Request)
|
||||
->setMethod('POST')
|
||||
->setUri('http://closure-compiler.appspot.com/compile')
|
||||
->setUri('https://closure-compiler.appspot.com/compile')
|
||||
->setAllHeaders([
|
||||
'Accept' => 'application/json',
|
||||
'Accept-Encoding' => 'gzip',
|
||||
@ -143,6 +143,8 @@ class JSMin {
|
||||
* @return void
|
||||
*/
|
||||
protected function checkMinifyErrors($options)
|
||||
{
|
||||
try
|
||||
{
|
||||
$errorRes = $this->closureCall($options);
|
||||
$errorJson = $errorRes->getBody();
|
||||
@ -158,6 +160,12 @@ class JSMin {
|
||||
die();
|
||||
}
|
||||
}
|
||||
catch (JsonException $e)
|
||||
{
|
||||
print_r($e);
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Files
|
||||
|
@ -112,7 +112,7 @@ class SyncKitsuWithMal extends BaseCommand {
|
||||
|
||||
if ( ! empty($data['updateKitsu']))
|
||||
{
|
||||
print_r($data['updateKitsu']);
|
||||
// print_r($data['updateKitsu']);
|
||||
$count = count($data['updateKitsu']);
|
||||
$this->echoBox("Updating {$count} outdated Kitsu {$type} list items");
|
||||
$this->updateKitsuListItems($data['updateKitsu'], $type);
|
||||
@ -244,6 +244,7 @@ class SyncKitsuWithMal extends BaseCommand {
|
||||
foreach($data['data'] as $listItem)
|
||||
{
|
||||
$id = $listItem['relationships'][$type]['data']['id'];
|
||||
|
||||
$potentialMappings = $includes[$type][$id]['relationships']['mappings'];
|
||||
$malId = NULL;
|
||||
|
||||
@ -291,7 +292,6 @@ class SyncKitsuWithMal extends BaseCommand {
|
||||
|
||||
foreach($missingMalIds as $mid)
|
||||
{
|
||||
// print_r($malList[$mid]);
|
||||
$itemsToAddToKitsu[] = array_merge($malList[$mid]['data'], [
|
||||
'id' => $this->kitsuModel->getKitsuIdFromMALId($mid, $type),
|
||||
'type' => $type
|
||||
|
Loading…
Reference in New Issue
Block a user