aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)