Skip to content

Commit

Permalink
Properly report when API hit limit reached at omgwtfnzbs.org
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] authored and [email protected] committed Oct 11, 2017
1 parent 5a41766 commit 491e3d2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# NZB Hydra changelog

----------
### 0.2.228
Changed: Properly report when API hit limit reached at omgwtfnzbs.org.

### 0.2.227
Fixed: Dereferer not used for NZB details links. See [#653](https://github.com/theotherp/nzbhydra/issues/653).

Expand Down
2 changes: 2 additions & 0 deletions nzbhydra/searchmodules/newznab.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@


def check_auth(body, indexer):
if "Request limit reached" in body or "Daily Hits limit reached" in body:
raise IndexerApiLimitReachedException("API limit reached", indexer)
if '<error code="100"' in body:
raise IndexerAuthException("The API key seems to be incorrect.", indexer)
if '<error code="101"' in body:
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.227
0.2.228

0 comments on commit 491e3d2

Please sign in to comment.