diff --git a/comet/templates/index.html b/comet/templates/index.html
index 643cbe0..f68adc7 100644
--- a/comet/templates/index.html
+++ b/comet/templates/index.html
@@ -635,7 +635,7 @@
return {
indexers: indexers,
maxResults: parseInt(maxResults),
- maxSize: parseFloat(maxSize),
+ maxSize: parseInt(maxSize) * 1073741824,
resolutions: selectedResolutions,
languages: selectedLanguages,
debridService: debridService,
diff --git a/comet/utils/general.py b/comet/utils/general.py
index 5423151..000fcf8 100644
--- a/comet/utils/general.py
+++ b/comet/utils/general.py
@@ -370,7 +370,7 @@ async def get_balanced_hashes(hashes: dict, config: dict):
for hash, hash_data in hashes.items():
hash_info = hash_data["data"]
- if hash_info["size"] / (1024**3) > max_size and max_size != 0:
+ if max_size != 0 and hash_info["size"] > max_size:
continue
if (
diff --git a/comet/utils/models.py b/comet/utils/models.py
index 016d6f2..4039a71 100644
--- a/comet/utils/models.py
+++ b/comet/utils/models.py
@@ -39,7 +39,7 @@ class ConfigModel(BaseModel):
languages: Optional[List[str]] = ["All"]
resolutions: Optional[List[str]] = ["All"]
maxResults: Optional[int] = 0
- maxSize: Optional[float] = 0
+ maxSize: Optional[int] = 0
debridService: str
debridApiKey: str
debridStreamProxyPassword: Optional[str] = ""