feat: link DLC and soundtracks to parent games
CI / test (push) Successful in 32s

Add games.parent_appid (schema v9), parse appinfo parent links, show addons and parent game in the card, and add import_steam.py --refresh-parents for existing databases.
This commit is contained in:
strsv committed 2026-11-07 01:36:26 +03:00
1 parent 376a2ee7a0
commit 528fcb7474
18 files changed
+135 -11

No files matched your search

+8 -1
View File
@@ -8,7 +8,7 @@ from datetime import datetime, timezone
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DEFAULT_DB = os.path.join(BASE_DIR, "steam.db")
SCHEMA_PATH = os.path.join(BASE_DIR, "tools", "schema.sql")
SCHEMA_VERSION = 8
SCHEMA_VERSION = 9
MOOD_PRESETS = {
"adventure-rpg-party": {
@@ -581,6 +581,12 @@ def _migration_8(con):
"ON hltb_cache(fetched_at)")
def _migration_9(con):
"""Link DLC, soundtracks and tools to their parent app."""
_ensure_column(con, "games", "parent_appid", "INTEGER")
con.execute("CREATE INDEX IF NOT EXISTS idx_games_parent ON games(parent_appid)")
MIGRATIONS = {
1: _migration_1,
2: _migration_2,
@@ -590,6 +596,7 @@ MIGRATIONS = {
6: _migration_6,
7: _migration_7,
8: _migration_8,
9: _migration_9,
}