added gifs scan at start

This commit is contained in:
onysd 2026-08-07 11:02:05 +03:00
parent 15f2d6e925
commit 4ac94f00de
10 changed files with 224 additions and 11 deletions

View file

@ -13,6 +13,12 @@ type GifCatalogStore interface {
// by the caller (same convention as documents/photos elsewhere in this
// codebase -- ids are app-generated, not database-serial).
CreateGifCatalogEntry(ctx context.Context, entry domain.GifCatalogEntry) (domain.GifCatalogEntry, error)
// HasGifCatalogSourceFilename reports whether a seed-imported entry for
// this filename already exists, so files.Service.SeedGifs can skip
// re-transcoding a file it already imported on a previous startup.
// Always false for an empty filename (that's the panel-upload sentinel,
// never a real seed match).
HasGifCatalogSourceFilename(ctx context.Context, filename string) (bool, error)
// ListGifCatalog returns every entry ordered by (sort_order, id).
// onlyEnabled=true is what @gif serves; the admin panel lists everything.
ListGifCatalog(ctx context.Context, onlyEnabled bool) ([]domain.GifCatalogEntry, error)