mirror of
https://github.com/devfake/flox.git
synced 2024-11-14 14:12:31 +01:00
fix TMDB X-RateLimit-Remaining header issue
This commit is contained in:
parent
30447f966f
commit
7a62ab14a3
@ -432,8 +432,12 @@
|
||||
if($response->getStatusCode() == 429) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$rateLimit = $response->getHeader('X-RateLimit-Remaining');
|
||||
|
||||
return ((int) $response->getHeader('X-RateLimit-Remaining')[0]) > 1;
|
||||
// Change it on production, good idea...
|
||||
// https://www.themoviedb.org/talk/5df7d28326dac100145530f2
|
||||
return $rateLimit ? (int) $rateLimit[0] > 1 : true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user