Skip to content

Commit 491e3d2

Browse files
theotherp@gmx.detheotherp@gmx.de
authored andcommitted
Properly report when API hit limit reached at omgwtfnzbs.org
1 parent 5a41766 commit 491e3d2

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# NZB Hydra changelog
22

33
----------
4+
### 0.2.228
5+
Changed: Properly report when API hit limit reached at omgwtfnzbs.org.
6+
47
### 0.2.227
58
Fixed: Dereferer not used for NZB details links. See [#653](https://github.com/theotherp/nzbhydra/issues/653).
69

nzbhydra/searchmodules/newznab.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828

2929

3030
def check_auth(body, indexer):
31+
if "Request limit reached" in body or "Daily Hits limit reached" in body:
32+
raise IndexerApiLimitReachedException("API limit reached", indexer)
3133
if '<error code="100"' in body:
3234
raise IndexerAuthException("The API key seems to be incorrect.", indexer)
3335
if '<error code="101"' in body:

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.2.227
1+
0.2.228

0 commit comments

Comments
 (0)