mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Fix Philip Hue APIv2 support without Entertainment group defined (#1743)
This commit is contained in:
@@ -30,7 +30,8 @@ enum HttpStatusCode {
|
||||
BadRequest = 400,
|
||||
UnAuthorized = 401,
|
||||
Forbidden = 403,
|
||||
NotFound = 404
|
||||
NotFound = 404,
|
||||
TooManyRequests = 429
|
||||
};
|
||||
|
||||
} //End of constants
|
||||
@@ -336,6 +337,15 @@ httpResponse ProviderRestApi::getResponse(QNetworkReply* const& reply)
|
||||
case HttpStatusCode::NotFound:
|
||||
advise = "Check Resource given";
|
||||
break;
|
||||
case HttpStatusCode::TooManyRequests:
|
||||
{
|
||||
QString retryAfterTime = response.getHeader("Retry-After");
|
||||
if (!retryAfterTime.isEmpty())
|
||||
{
|
||||
advise = "Retry-After: " + response.getHeader("Retry-After");
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
advise = httpReason;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user