aboutsummaryrefslogtreecommitdiffstats
path: root/tpblite/models
diff options
context:
space:
mode:
authorLoic Coyle <loic.coyle@hotmail.fr>2020-08-22 03:37:04 +0200
committerLoic Coyle <loic.coyle@hotmail.fr>2020-08-22 03:37:04 +0200
commit85adf1b1126de2091828d5ed0309d037e66b3232 (patch)
tree596cb4bae0906b7d9d46b2b68fb2360024af71b4 /tpblite/models
parent55300aef48335969f5615f44e6ac5e1bf05667ec (diff)
downloadtpb-lite-85adf1b1126de2091828d5ed0309d037e66b3232.tar.gz
tpb-lite-85adf1b1126de2091828d5ed0309d037e66b3232.tar.bz2
tpb-lite-85adf1b1126de2091828d5ed0309d037e66b3232.zip
add 0 check
Diffstat (limited to 'tpblite/models')
-rw-r--r--tpblite/models/utils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tpblite/models/utils.py b/tpblite/models/utils.py
index 8043707..b9126e9 100644
--- a/tpblite/models/utils.py
+++ b/tpblite/models/utils.py
@@ -44,8 +44,10 @@ class QueryParser:
@classmethod
def top(cls: Type[T], base_url: str, category: int, last_48: bool) -> T:
+ if category == 0:
+ category = "all"
if last_48:
- segments = ("top", '48h' + str(category))
+ segments = ("top", "48h" + str(category))
else:
segments = ("top", str(category))
return cls(base_url, segments)