diff --git a/README.md b/README.md index 078e251..ab4a00d 100644 --- a/README.md +++ b/README.md @@ -540,9 +540,31 @@ Once the complete libraries you care about are indexed and semantic ranking is c The first version contributes Movies, Episodes and generic Videos because those are the item types currently ingested by `jellyfin-index`. -### Docker migration and existing thumbnails +### Existing embeddings and Jellyfin Trickplay images -Stored thumbnail paths created before the Docker deployment may contain the old host prefix such as `/opt/jellyfin-search/data/thumbs/...`. Scene Search now rebases those paths onto the active `DATA_DIR` automatically, so existing indexed frames can still be captioned and served from the Docker container without reindexing solely to change path prefixes. +The expensive SigLIP work is canonical in SQLite, not only in Meilisearch. Each frame keeps its embedding in `frames.embedding_f16`; Meilisearch is a disposable serving copy. Upgrading to on-demand Jellyfin Trickplay therefore does **not** require existing media to be re-embedded. + +Existing Jellyfin frame rows already contain the frame number plus Jellyfin item/media-source/Trickplay metadata needed to find the same tile again. For those rows Scene Search now ignores the old local `thumb_path` during normal operation and fetches/crops the matching Trickplay tile from Jellyfin on demand. Legacy local JPEGs remain as a migration fallback if Jellyfin cannot temporarily serve that tile. + +New Jellyfin indexing downloads each Trickplay sheet only long enough to crop and embed its frames in memory. It stores a lightweight `jellyfin://...` locator in the legacy non-null `thumb_path` column instead of writing permanent duplicate JPEGs. ffmpeg fallback media without Jellyfin Trickplay still keeps local extracted frames. + +This means an installation that already spent many hours creating embeddings can upgrade, start/resume captioning, and rebuild Meilisearch from the existing SQLite vectors without repeating SigLIP indexing. + +After verifying that captions and search thumbnails are loading correctly from Jellyfin, inspect the old duplicate JPEG cache with: + +```bash +docker compose exec scene-search \ + python -m scene_search.cli cleanup-jellyfin-thumbs +``` + +That command is a dry run and reports how many files/bytes can be reclaimed. To remove only those duplicated Jellyfin Trickplay JPEGs: + +```bash +docker compose exec scene-search \ + python -m scene_search.cli cleanup-jellyfin-thumbs --yes +``` + +The cleanup does not alter SQLite media/frame rows, embeddings, captions or Meilisearch documents. ## Removing indexed sources