Reduce number of Steam API requests.
This commit is contained in:
parent
3fc2e15faa
commit
26fca8373b
|
@ -102,8 +102,8 @@ def update_info(release: Release) -> None:
|
|||
release.game_name = package_details["name"]
|
||||
|
||||
# Use the "base game" of the package as the basis for further computation.
|
||||
# We guesstimate the base game as the most popular app (i.e. the one with the most reviews)
|
||||
package_appids = [app["id"] for app in package_details["apps"]]
|
||||
# We guesstimate the base game as the most popular app (i.e. the one with most reviews) among the first three
|
||||
package_appids = [app["id"] for app in package_details["apps"][:3]]
|
||||
package_apps_details = [appdetails(appid) for appid in package_appids]
|
||||
details = max(package_apps_details, key=lambda app: reviews(app["steam_appid"])[1])
|
||||
appid = details["steam_appid"]
|
||||
|
@ -123,6 +123,6 @@ def update_info(release: Release) -> None:
|
|||
release.type = "DLC"
|
||||
|
||||
# Add highlight if "denuvo" occurs in Steam's DRM notice or potential 3rd-party EULA
|
||||
if "denuvo" in (details.get("drm_notice", "") + eula(appid)).lower():
|
||||
if "denuvo" in details.get("drm_notice", "").lower() or "denuvo" in eula(appid).lower():
|
||||
logger.info("'denuvo' found in Steam DRM-notice/EULA; adding 'DENUVO' to highlights")
|
||||
release.highlights.append("DENUVO")
|
||||
|
|
Reference in a new issue