Skip to content

v0.1.7

Latest

Choose a tag to compare

@HSPK HSPK released this 05 Jun 09:18
· 15 commits to main since this release
5949570

Highlights

Stable per-library UUID

Each library database now has a stable library_id (UUID4), generated on first read and immutable. Exposed via GET /api/library. Concurrent first-readers (multi-worker startup, racing library switches) are safely deduplicated.

Per-library thumbnail cache

Thumbnails are now cached under ~/.cache/mm/thumbs/<library_id>/<size>/<media_id>.webp. Fixes a real collision where thumbnails would bleed across libraries because media_id is only unique within a single DB.

Unified, YAML-overridable application config

~12 formerly scattered constants (CLIP model/threshold/labels, hashing chunk size, thumbnail sizes & HTTP cache headers, server cache TTLs, cache directories, import template, DB name) are now nested sections of CliConfig in ~/.config/mm.yaml. Edit any of them; defaults are unchanged.

paths:
  cache_dir: ~/.cache/mm
clip:
  model_name: ViT-L-14
  confidence_threshold: 0.5
thumbnails:
  sizes: {sm: [200, 200], md: [400, 400], lg: [800, 800], xl: [1920, 1080]}
server:
  token_cache: {ttl: 300, max: 256}

Internal: explicit storage injection

storage: FileStorage is now a required keyword-only argument on all storage-aware helpers (was = local_storage default). Makes the dependency boundary explicit and prevents accidental local-filesystem reads in code that should be backend-agnostic.

Test suite

33 → 45 tests, covering library_id semantics, thumbnail namespacing, YAML override round-trip, and config-cache behaviour.

Full diff: #2