Show folder sizes for movies, shows and seasons. Closes #5
CI / test (push) Successful in 1m12s

The library lists now show how much space each movie and show takes on disk, counting everything a move copies, with a per-season breakdown for shows, a running total and a "Largest first" sort.

- sizes.rs: a single background worker measures one folder at a time. Listing returns cached sizes straight away and queues folders; the UI
  polls until every size has arrived.
- Cached in a new folder_sizes table (store migration v2). A size is kept while the folder's signature (mtimes of the folder and its direct
  subfolders) is unchanged, checked at most hourly and re-measured after 7 days.
- Each agent measures its own folders, so peer listings carry the peer's sizes.
- Tests for measuring, signatures, natural season order, the migration, and an e2e test covering both sides and a moved item.
This commit is contained in:
IxianPixel committed 2026-11-06 16:43:52 +00:00
1 parent 4c6217bd40
commit 25a743b350
11 files changed
+672 -26

No files matched your search

+10
View File
@@ -68,6 +68,16 @@ Retrying a failed job re-runs from its stage. Interrupted jobs resume on start.
- Alternatives kept open behind the pull/serve split: iroh (QUIC, NAT
traversal) once iroh-blobs reaches 1.0; rclone as a pluggable transport.
## Folder sizes
Library items carry the size of their folder on disk, counting the same files a
move copies. Each agent measures its own folders (`sizes.rs`): listing a library
returns cached sizes at once and queues every folder for a single background
worker, so a NAS is never asked to walk several folders at once. A cached size
is kept while the folder's signature (modified times of the folder and its
direct subfolders) is unchanged, re-checked at most hourly, and measured again
after seven days regardless. The UI polls the list until every size is in.
## Jellyfin integration
- Browse: `GET /Items?parentId=<library>&includeItemTypes=Movie,Series&recursive=true&fields=Path,…`