From 5adb3aab9db3147701d32c2e9ea49296cdde544f Mon Sep 17 00:00:00 2001 From: zurdi Date: Wed, 9 Aug 2023 00:58:58 +0200 Subject: [PATCH] ps2 igdb id set as constant --- backend/handler/igdb_handler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/handler/igdb_handler.py b/backend/handler/igdb_handler.py index 2f01ee24a..7d032f056 100644 --- a/backend/handler/igdb_handler.py +++ b/backend/handler/igdb_handler.py @@ -15,6 +15,7 @@ from .ps2_opl_index import opl_index redis_client = Redis(host=REDIS_HOST, port=REDIS_PORT, db=0, decode_responses=True) ps2_opl_regex = r"^([A-Z]{4}_\d{3}\.\d{2})\..*$" +PS2_IGDB_ID = 8 class IGDBHandler: def __init__(self) -> None: @@ -120,7 +121,7 @@ class IGDBHandler: # Patch support for PS2 OPL filename format match = re.match(ps2_opl_regex, search_term) - if p_igdb_id == 8 and match: + if p_igdb_id == PS2_IGDB_ID and match: serial_code = match.group(1) index_entry = opl_index.get(serial_code, None) if index_entry: