Move a single season of a TV show (#4)
CI / test (push) Successful in 1m14s

Shows can be expanded to list their seasons, each with its size and its own Dry run / Move buttons. A season joins the same show on the other
server, so finished seasons can go to the big server while the current one stays on the fast one.

- Source exports a season from the show folder, with a manifest of just that season's folder plus the show's loose non-video files. Refuses
  seasons with no folder of their own, or whose folder holds otherseasons' episodes.
- Destination finds the show by provider ID, then name. If it already has the show, the show's own files are skipped (Job.skip_files) and
  never overwritten; otherwise they come with the season. Refuses if the season folder already exists.
- Only episode watch state is carried for a season.
- Source trashes just the season folder; after the last season, the leftover show folder joins it in the same trash entry if no videos
  remain. The chosen trash entry is saved so a re-run after a crash finishes in the same place.
- New GET /seasons (UI and peer). Fake Jellyfin gains season items.
- e2e tests: season into a new show, into an existing show, last season leaving, destination already has the season, misfiled episodes.
This commit is contained in:
IxianPixel committed 2026-11-06 17:02:40 +00:00
1 parent 25a743b350
commit 484ac50508
21 files changed
+959 -111

No files matched your search

+9
View File
@@ -35,6 +35,7 @@ forwarding.
|---|---|
| `GET /info` | Node name, version, Jellyfin version |
| `GET /libraries`, `GET /items?library=&search=` | Browse the peer's Jellyfin |
| `GET /seasons?series=` | A show's seasons, with each one's folder if it has its own |
| `POST /exports {item_id}` | Source: start checking, hashing and capturing user data. Idempotent per item. |
| `GET /exports/{id}` | Poll: `Preparing` → `Ready` (with `ExportInfo`) or `Failed` |
| `GET /exports/{id}/files/{idx}` | Range-capable download of manifest entry `idx` |
@@ -83,6 +84,14 @@ after seven days regardless. The UI polls the list until every size is in.
- Browse: `GET /Items?parentId=<library>&includeItemTypes=Movie,Series&recursive=true&fields=Path,…`
- Folder: a movie's parent folder, or a series' own folder. It must sit strictly
inside a library location. A movie folder must contain no other main videos.
- Seasons: `includeItemTypes=Season` under the series. A season export's folder
is the show's; its manifest holds only `<season folder>/…` plus the show's
loose non-video files (`SeasonInfo.show_files`). The destination finds the
show by provider ID, then name, and skips those show files if it already has
the show. A season's own user data isn't carried (it would land on the
whole show); its episodes' is. After the last season leaves, the source
moves what remains of the show folder into the same trash entry, but only if
no videos are left in it.
- Rescan: `POST /Library/Media/Updated` for the exact folder, then poll. The
first update can be lost, so it is re-sent halfway through the timeout.
- Finding the new item: by **path**, since we know exactly where we put it.