Commit Graph

5 Commits

Author SHA1 Message Date
Ethanfel 1ce1e7d48a feat: add stats-based sorting (downloads, rating, thumbsup)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 14:36:55 +01:00
Ethanfel c3cd35add7 feat: enrich list API responses with CivitAI stats from local DB
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 14:34:51 +01:00
Ethanfel c1e124bcc8 feat: add CivitAI stats fetch service
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 14:32:52 +01:00
Ethanfel 44088649d8 feat: add SQLite stats database layer for CivitAI stats
Implements StatsDB class with upsert, batch upsert, get_by_hashes,
get_all, count, and close methods backed by a WAL-mode SQLite database.
Also guards __init__.py relative imports behind __package__ check so
pytest can run without ComfyUI context, and removes empty tests/__init__.py
to prevent pytest Package collector from traversing into the plugin root.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 14:29:59 +01:00
Ethanfel aefb129e07 chore: add test infrastructure with conftest for import paths
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 14:14:08 +01:00