mirror of
https://github.com/g0ldyy/comet.git
synced 2026-01-12 01:16:12 +01:00
fix: do the maths client side
This commit is contained in:
@@ -635,7 +635,7 @@
|
||||
return {
|
||||
indexers: indexers,
|
||||
maxResults: parseInt(maxResults),
|
||||
maxSize: parseFloat(maxSize),
|
||||
maxSize: parseInt(maxSize) * 1073741824,
|
||||
resolutions: selectedResolutions,
|
||||
languages: selectedLanguages,
|
||||
debridService: debridService,
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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] = ""
|
||||
|
||||
Reference in New Issue
Block a user