From 904ea109204ddc97cd1021dca37184f8a7f43238 Mon Sep 17 00:00:00 2001 From: Kevin Trocolli Date: Sat, 19 Aug 2023 01:35:15 -0400 Subject: [PATCH] cm: remove print, fix default config --- titles/cm/config.py | 13 ++++++++++++- titles/cm/index.py | 3 +-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/titles/cm/config.py b/titles/cm/config.py index 8bb23ec..ad96a7d 100644 --- a/titles/cm/config.py +++ b/titles/cm/config.py @@ -31,7 +31,18 @@ class CardMakerVersionConfig: 1: {"ongeki": 1.30.01, "chuni": 2.00.00, "maimai": 1.20.00} """ return CoreConfig.get_config_field( - self.__config, "cardmaker", "version", default={} + self.__config, "cardmaker", "version", default={ + 0: { + "ongeki": "1.30.01", + "chuni": "2.00.00", + "maimai": "1.20.00" + }, + 1: { + "ongeki": "1.35.03", + "chuni": "2.10.00", + "maimai": "1.30.00" + } + } )[version] diff --git a/titles/cm/index.py b/titles/cm/index.py index 348ec4f..571b1d3 100644 --- a/titles/cm/index.py +++ b/titles/cm/index.py @@ -85,8 +85,6 @@ class CardMakerServlet: endpoint = url_split[len(url_split) - 1] client_ip = Utils.get_ip_addr(request) - print(f"version: {version}") - if version >= 130 and version < 135: # Card Maker internal_ver = CardMakerConstants.VER_CARD_MAKER elif version >= 135 and version < 140: # Card Maker 1.35 @@ -124,6 +122,7 @@ class CardMakerServlet: except Exception as e: self.logger.error(f"Error handling v{version} method {endpoint} - {e}") + raise return zlib.compress(b'{"stat": "0"}') if resp is None: