Files
3pmonitor/app/config.py
Junaid Saeed Uppal e65b6b2cfb fix reversed A/C chair mapping and update hot/cold on round end
CHAIRS mapping was {1:A, 2:B, 3:C} but the API's country field has
1=C and 3=A. Fixed the mapping in backend and both frontends, added a
startup migration to swap A↔C columns in existing DB data, corrected
multiIf SQL queries that hardcoded the wrong winner→column mapping,
and moved _save_round() to the ENDED status block so hot/cold stats
reflect the latest round immediately.
2026-02-25 20:49:16 +05:00

44 lines
1.4 KiB
Python

import os
# StreamKar API constants (from decompiled APK)
ACCESS_KEY_ID = "cBdjSuFA3gi9Y92wKcCilh9NeloE"
SK_KIMI = "dsgafoaodhafpdnfopauifda352176sn"
APP_ID = 1
VERSION_CODE = 1337
VERSION_NAME = "9.18.0"
PLATFORM = 2
CHANNEL_CODE = "12002"
API_BASE = "https://api.loee.link"
SOCKET_BASE = "https://into1.loee.link"
API_ENTRANCE = f"{API_BASE}/meShow/entrance"
API_URL = "https://web.kktv9.com/meShowApi"
DEFAULT_ROOM_ID = 668797247
POLL_INTERVAL = 1.0
# sv signature constants
EM5_SALT = "cc16be4b:346c51d"
EM5_ALPHABET = "AB56DE3C8L2WF4UVM7JRSGPQYZTXK9HN"
# MsgTags
MSGTAG_ROOM_LOGIN = 10010201
MSGTAG_LOGIN_ACK = 10010202
MSGTAG_GAME_WIN = 10010778
MSGTAG_USER_BET = 10010795
# Game constants
SUITS = {1: "\u2660", 2: "\u2665", 3: "\u2663", 4: "\u2666"}
VALUES = {1: "A", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", 7: "7",
8: "8", 9: "9", 10: "10", 11: "J", 12: "Q", 13: "K", 14: "A"}
HAND_TYPES = {1: "High Card", 2: "Pair", 3: "Flush", 4: "Straight",
5: "Straight Flush", 6: "Trail"}
CHAIRS = {1: "C", 2: "B", 3: "A"}
STATUS_NAMES = {0: "NEW", 1: "BETTING", 2: "REVEALING", 3: "ENDED"}
# Environment
CLICKHOUSE_HOST = os.environ.get("CLICKHOUSE_HOST", "localhost")
CLICKHOUSE_PORT = int(os.environ.get("CLICKHOUSE_PORT", "8123"))
SK_CREDENTIALS_FILE = os.environ.get("SK_CREDENTIALS_FILE", "sk_credentials.json")
WEB_PORT = int(os.environ.get("WEB_PORT", "8765"))