manual submit

This commit is contained in:
Khoa (Revenovich) Tran Gia
2026-03-07 21:49:16 +07:00
parent 1748cbf8d2
commit 6004b000a7
39 changed files with 5794 additions and 614 deletions

View File

@@ -213,6 +213,19 @@ def get_all_images() -> list[dict]:
return [dict(r) for r in rows]
def get_images_by_ids(ids: list[int]) -> list[dict]:
"""Return image rows for the given ids (excluding image_data), ordered by id DESC."""
if not ids:
return []
placeholders = ",".join("?" * len(ids))
with _connect() as conn:
rows = conn.execute(
f"SELECT {_SAFE_COLS} FROM input_images WHERE id IN ({placeholders}) ORDER BY id DESC",
tuple(ids),
).fetchall()
return [dict(r) for r in rows]
def delete_image(row_id: int, comfy_input_path: str | None = None) -> None:
"""
Remove an image record from the database.