From 58669dba3e4231cb1eee1982aae5caff6f2be1e3 Mon Sep 17 00:00:00 2001 From: Goldy <153996346+g0ldyy@users.noreply.github.com> Date: Sun, 17 Nov 2024 14:21:50 +0100 Subject: [PATCH] .get() not needed as config is already validated by pydantic so it is 0 by default even if not defined by user --- comet/utils/general.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comet/utils/general.py b/comet/utils/general.py index a1fbca3..1a6ef02 100644 --- a/comet/utils/general.py +++ b/comet/utils/general.py @@ -528,7 +528,7 @@ async def get_torrent_hash(session: aiohttp.ClientSession, torrent: tuple): def get_balanced_hashes(hashes: dict, config: dict): max_results = config["maxResults"] - max_results_per_resolution = config.get("maxResultsPerResolution", 0) + max_results_per_resolution = config["maxResultsPerResolution"] max_size = config["maxSize"] config_resolutions = [resolution.lower() for resolution in config["resolutions"]]