Commit Graph

290 Commits

Author SHA1 Message Date
Miguel Palhas 64e28e5930 feat: remove files for one season or episode
DELETE /api/series/{id}/seasons/{n}/files and
DELETE /api/episodes/{id}/files unlink what the scope covers, drop the
matching media_files rows and clear wanted, in one action. 204 on
success, 404 for an unknown season or episode, and a scope with nothing
on disk still clears intent.

Season and episode rows stay: TMDB owns that metadata and the next
refresh would recreate them.

The three scopes share one unlink path. A whole series still resolves to
its title folder (§7.4, atomic); a season or episode resolves to the
recorded file and nothing else, so a narrow call cannot reach a sibling.
The intent clear goes through arr_core::tracking::apply_tracked(false),
the same §4.1 rule #171 landed.

An episode whose file just went is set back to 'missing' when it was
'available', matching what a failed import already does. Closes #174.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-24 16:43:53 +01:00
Miguel Palhas f3336d066e Merge #172: search returns titles only
Closes #172
2026-08-24 16:40:44 +01:00
Miguel Palhas 27525302b2 Merge #173: library is the homepage
Closes #173
2026-08-24 16:40:38 +01:00
Miguel Palhas 4b89245f00 fix(api): drop episode rows from unified search
Search returns titles only (§9.2, amended): the episode branch of the
library query, its json_each token machinery, and the SPA's episode
row rendering are removed. Deep links to episode releases stay.

Fixes #172
2026-08-24 16:39:48 +01:00
Miguel Palhas 7ef24088a5 feat(web): library homepage, chain in settings
Implements the §9.7 shell rulings (issue #173): "/" renders the library
and the board route is gone — every former board target (Esc, cleared
search, detail parent routes, the not-found fallback) lands on the
library. The signal chain moves into /settings as its first section,
lamps still driven by the health poll; the master lamp stays on the
rail. The wordmark is now a real anchor that navigates home.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-24 16:39:07 +01:00
Miguel Palhas 4a611a6794 Merge #171: untracking a season clears wanted
Closes #171
2026-08-24 16:32:02 +01:00
Miguel Palhas 9e003823c6 feat: untracking a season clears its wanted 2026-08-24 16:31:09 +01:00
Miguel Palhas 205855fa7f Merge #170: centre deck column chips in their box
Closes #170
2026-08-24 16:29:25 +01:00
Miguel Palhas fada2ff89a fix(web): centre deck chips in their boxes 2026-08-24 16:28:42 +01:00
Miguel Palhas 60642d8709 Merge #169: amend DESIGN.md for four rulings
Closes #169
2026-08-24 16:21:03 +01:00
Miguel Palhas c37031207e docs: amend DESIGN.md for four rulings
Untracking a season now clears its episodes' wanted flag, unified search
returns titles only, the library is the homepage and the signal chain moves
into settings, and the wordmark links home.

Refs #169
2026-08-24 16:20:13 +01:00
Miguel Palhas 869e3af9c8 Merge milestone 'Feedback pass'
ci / web (push) Successful in 36s
e2e / e2e (push) Successful in 1m10s
ci / rust (push) Successful in 1m19s
Nine issues from a hands-on pass over the deployed build.

Behaviour: adding a series no longer tracks its whole back catalogue
(auto_track applies from the second refresh onward); a series-title
query no longer returns every episode of that series; seasons and
episodes come back newest-first.

UI: cast comes off title detail; buttons and chips share one 2rem
geometry; state chips carry the ramp (green satisfied, amber gap,
violet active, neutral idle); the header drops its verdict line and
sits on the content width; season and episode rows lose their search
button and the deck sweeps itself when opened empty.

DESIGN.md 4.1, 4.2, 9.2 and 9.6 amended first; every other issue
implements against the amended text.

Closes #159, #160, #161, #162, #163, #164, #165, #166, #167
2026-08-24 15:26:12 +01:00
Miguel Palhas e509c37649 Merge #167: tv deck sweeps on open when empty 2026-08-24 15:14:53 +01:00
Miguel Palhas 8a672c1dcf feat(web): tv deck sweeps on open when empty
Drop the standalone search button from season and episode rows; the
deck is the one control. An empty deck fires a targeted sweep on
open and reports progress in place; a deck with results never sweeps
on open. re-search inside the deck forces a fresh sweep.
2026-08-24 14:42:29 +01:00
Miguel Palhas fb03fc3808 Merge #166: lamp-only header on the content width 2026-08-24 14:38:03 +01:00
Miguel Palhas 1add26b7f7 Merge #165: state ramp on status and counts chips 2026-08-24 14:38:03 +01:00
Miguel Palhas fa5d876c09 chore(web): sync design.json to the state ramp
The token system still mirrored the pre-amendment palette and carried
the rule 'Don't colour complete green or incomplete amber', which now
contradicts DESIGN.md 4.2 and would have had the next session revert
the ramp. Drops the four --status-* tokens no rule consumes any more;
satisfaction reuses --signal-ok and a gap --signal-warn.

Committed by the blitz orchestrator: the authoring session wedged.
2026-08-24 14:37:52 +01:00
Miguel Palhas 0cb8111678 fix(web): pin the version readout to the rail edge 2026-08-24 14:36:18 +01:00
Miguel Palhas d1d6b4f9a0 feat(web): lamp-only header on the content width
Drops #master-verdict entirely - element, .rail-verdict rules and every
line that wrote into it. The lamp is the only header signal; the
unreachable detail moves onto the board's arr module so nothing is lost.
Rail contents move into .rail-inner capped at the deck's 68rem and
centred, leaving the panel full-bleed.

Committed by the blitz orchestrator: the authoring session wedged with
the work complete on disk and stopped accepting input.
2026-08-24 14:36:18 +01:00
Miguel Palhas 2dbb0f48f7 feat(web): state ramp on status and counts chips
Per amended DESIGN.md §4.2: green --signal-ok for on disk/complete,
amber --signal-warn for wanted-but-missing, violet --status-airing for
downloading, neutral for untracked and waiting. Stars go amber. Words
stay in every chip; verdict chips untouched.
2026-08-24 13:57:17 +01:00
Miguel Palhas 8221ea633c Merge #163: drop cast from title detail 2026-08-24 12:34:34 +01:00
Miguel Palhas 7d4ddb7331 refactor(web): drop cast from title detail
DESIGN.md §9.6 no longer carries cast (#163). Removes the cast
sections, the MetadataCastMember schema and field from both metadata
responses, and every .cast-* rule. arr-meta keeps CastMember and the
credits append; the TMDB call is unchanged.
2026-08-24 12:34:00 +01:00
Miguel Palhas ed39b1ca49 Merge #164: one control geometry for buttons and chips 2026-08-24 12:12:08 +01:00
Miguel Palhas 1a4394cf0d feat(web): one control geometry for buttons and chips
Buttons, chips, toggles and the search input converge on --control-h
2rem with --text-xs shared, and .control becomes an inline-flex so
anchor text centres in the title-detail action bar. Chip colour is
untouched (#165 owns it). Verified in agent-browser at 1440px, 46rem
and 40rem; the release deck keeps its column widths and does not
scroll horizontally.
2026-08-24 12:11:08 +01:00
Miguel Palhas 4d5cc120d1 fix(api): newest-first season and episode order
DESIGN.md §9.6 now puts the current season at the top: seasons
descend by number within a series (season 0 lands last under plain
numeric descending) and episodes descend within each season. Changed
the two queries in load_seasons; the SPA renders this order as given.

arr-compat checked and untouched: it reads seasons with its own
ORDER BY number query straight from the database, never through
arr-api, and SeasonResource carries season_number, which Jellyseerr
matches on rather than position. Sonarr's real API also returns
seasons ascending, so the shim keeps the contract it emulates.

The existing vanished-flag test indexed seasons positionally; it now
looks them up by number so it tests the flag, not the order. New test
asserts [2, 1, 0] for seasons and descending episodes within each.
.sqlx regenerated via just db-prepare. just ci green locally.
2026-08-24 12:09:52 +01:00
Miguel Palhas 2c293e7f60 fix(api): episode rows need a token beyond series title
Per amended DESIGN.md 9.2, an episode row now also requires at
least one query token to match the episode title on its own, so
a series-title-only query lists the series and no episodes.
2026-08-24 11:59:18 +01:00
Miguel Palhas 8f7373d73d fix(core): auto-track skips the seeding refresh
A series' first metadata refresh reveals its whole back catalogue, and
apply_auto_track flagged every season as new — adding Rick and Morty
tracked S01-S09 and wanted 91 episodes (#160).

Per DESIGN.md 4.1 the rule applies from the second refresh onward.
The caller passes whether metadata_refreshed_at is set; arr-core stays
IO-free and decides. Wired through the daemon's daily refresh and the
API's create-season endpoint.
2026-08-24 11:40:44 +01:00
Miguel Palhas 2495895717 docs: record five rulings from the deployed build 2026-08-24 11:28:05 +01:00
Miguel Palhas 40620d93b4 fix(web): series page loads; cast art falls back
ci / web (push) Successful in 34s
e2e / e2e (push) Successful in 57s
ci / rust (push) Successful in 1m9s
2026-08-24 03:21:42 +01:00
Miguel Palhas 1c351eb867 Merge #151: library poster grid with list toggle
Closes #151
2026-08-24 03:05:59 +01:00
Miguel Palhas a6cdd0ab0b feat(web): library poster grid with list toggle 2026-08-24 03:04:06 +01:00
Miguel Palhas 365c2a7587 Merge #148: rich search result rows
Closes #148
2026-08-24 01:57:25 +01:00
Miguel Palhas 07741c80fe feat(web): rich search rows (#148)
Every search row — library and TMDB alike — gains a w92 poster
thumbnail with a same-size blank fallback, a TMDB rating chip
(hidden when there are no votes), and a trailer chip that resolves
GET /api/trailer on click only, opening the tab inside the handler.
Episode hits carry the series' TMDB id so their chip resolves too.
2026-08-24 01:55:00 +01:00
Miguel Palhas 82b294ab1b Merge #150: series detail metadata header
Closes #150
2026-08-24 00:40:22 +01:00
Miguel Palhas ed210b29d3 feat(web): series detail metadata header 2026-08-24 00:37:53 +01:00
Miguel Palhas b413718fd1 fix(web): unrated movies show no rating 2026-08-24 00:01:17 +01:00
Miguel Palhas 9a03fc9963 Merge #149: movie detail page
Closes #149
2026-08-24 00:00:22 +01:00
Miguel Palhas fdaaeccb40 feat(web): movie detail page at /movies/{id} 2026-08-24 00:00:18 +01:00
Miguel Palhas be2c5f7e3c Merge #147: posters and ratings on search results
Closes #147
2026-08-23 22:45:49 +01:00
Miguel Palhas 5e2bb5dff7 feat(api): carry poster and rating through search and lists
Widen the unified search so both §9.2 halves can render a thumbnail
and a rating: TMDB results gain vote_average/vote_count from the
search bodies, library results read the #145 artwork columns, and
episodes take their series' art. GET /api/movies and /api/series gain
the same two fields for the #151 grid. Mirrors in web updated.
2026-08-23 22:45:08 +01:00
Miguel Palhas 30382585ea fix(meta,api): detail ratings are optional too 2026-08-23 22:26:04 +01:00
Miguel Palhas c9e73cb23c Merge #156: unrated titles store NULL
Closes #156
2026-08-23 22:24:05 +01:00
Miguel Palhas 8af85606a0 test(api): match detail call by its appended resources 2026-08-23 22:22:14 +01:00
Miguel Palhas 08e3c7bce7 fix(meta): store unrated titles as NULL, not zero
TMDB reports vote_average: 0 where no rating exists (#156). Normalise
it to None at the arr-meta edge, like non_empty does for "", and let
the Option flow through the daemon refresh and API add paths so the
nullable columns from #145 do their job.
2026-08-23 22:21:57 +01:00
Miguel Palhas 22f5d6b463 Merge #146: title metadata endpoints
Closes #146
2026-08-23 22:19:03 +01:00
Miguel Palhas 60fcc9f3d5 feat(api): metadata endpoints for library titles 2026-08-23 22:17:51 +01:00
Miguel Palhas b59e30dbdb Merge #145: store poster, backdrop and rating
Closes #145
2026-08-23 22:13:37 +01:00
Miguel Palhas 8478c0f8a9 feat(db): store poster, backdrop and rating on titles
§9.6 keeps rich detail out of the database except for the three fields
pure-SQL views need. Adds poster_path, backdrop_path and vote_average to
movies and series, written by the daily metadata refresh in both lanes
and filled at add time from the TMDB response the create flows already
fetch.
2026-08-23 22:12:05 +01:00
Miguel Palhas 82f87d61f1 Merge #144: trailer endpoint by TMDB id
Closes #144
2026-08-23 22:04:42 +01:00
Miguel Palhas 80a63ea2e1 feat(api): resolve trailer chips by TMDB id 2026-08-23 22:03:04 +01:00