first commit
Build and deploy / build-and-push (push) Successful in 17s
Build and deploy / deploy (push) Successful in 10s

This commit is contained in:
william
2026-08-21 16:23:49 +02:00
committed by william
commit 3f4ebc4527
248 changed files with 10180 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
import os
from ..constants import PROJECTS_DIR
from ..connection import connect
from ..db_path import db_path
def list_games():
"""Scanne le dossier projects/ : chaque sous-dossier avec un game.db est un jeu."""
games = []
if not os.path.isdir(PROJECTS_DIR):
return games
for slug in sorted(os.listdir(PROJECTS_DIR)):
path = db_path(slug)
if os.path.isfile(path):
conn = connect(slug)
row = conn.execute("SELECT value FROM _meta WHERE key = 'name'").fetchone()
conn.close()
games.append({"slug": slug, "name": row["value"] if row else slug})
return games