.get() not needed as config is already validated by pydantic so it is 0 by default even if not defined by user

This commit is contained in:
Goldy
2024-11-17 14:21:50 +01:00
committed by GitHub
parent fefc260b08
commit 58669dba3e
+1 -1
View File
@@ -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"]]