fix: do the maths client side

This commit is contained in:
Goldy
2024-07-15 23:57:27 +02:00
parent 10de453083
commit b0aa42c519
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -635,7 +635,7 @@
return {
indexers: indexers,
maxResults: parseInt(maxResults),
maxSize: parseFloat(maxSize),
maxSize: parseInt(maxSize) * 1073741824,
resolutions: selectedResolutions,
languages: selectedLanguages,
debridService: debridService,
+1 -1
View File
@@ -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 (
+1 -1
View File
@@ -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] = ""