Skip to content

Commit

Permalink
Title class added space stripping on query due to hoster character limit
Browse files Browse the repository at this point in the history
  • Loading branch information
“duck7000” committed Apr 18, 2024
1 parent 97fec8a commit 047270f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Imdb/Title.php
Original file line number Diff line number Diff line change
Expand Up @@ -2734,7 +2734,10 @@ private function creditsQuery($crewCategory)
}
}
EOF;
$data = $this->graphql->query($query, "CreditCrew", ["id" => "tt$this->imdbID"]);
// this strip spaces from $query to lower character count due hosters limit
$queryStripped = implode("\n", array_map('trim', explode("\n", $query)));

$data = $this->graphql->query($queryStripped, "CreditCrew", ["id" => "tt$this->imdbID"]);
return $data;
}

Expand Down

0 comments on commit 047270f

Please sign in to comment.