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
..
2026-08-22 22:38:31 +01:00
2026-08-23 14:56:51 +01:00
2026-08-23 14:56:51 +01:00
2026-08-22 21:00:35 +01:00
2026-08-23 17:45:09 +01:00
2026-08-23 14:56:51 +01:00
2026-08-23 00:42:13 +01:00
2026-08-22 21:43:03 +01:00
2026-08-22 23:21:30 +01:00
2026-08-23 18:23:41 +01:00
2026-08-23 19:34:55 +01:00
2026-08-22 21:43:03 +01:00
2026-08-22 21:43:03 +01:00
2026-08-23 02:31:50 +01:00
2026-08-22 21:00:35 +01:00
2026-08-24 11:40:44 +01:00
2026-08-23 16:50:45 +01:00
2026-08-23 18:18:26 +01:00
2026-08-23 01:40:53 +01:00
2026-08-23 18:18:26 +01:00
2026-08-23 09:13:37 +01:00
2026-08-23 19:07:00 +01:00
2026-08-22 21:43:03 +01:00
2026-08-23 16:53:52 +01:00
2026-08-22 23:02:34 +01:00
2026-08-22 20:40:31 +01:00
2026-08-22 23:02:34 +01:00
2026-08-23 14:56:51 +01:00
2026-08-23 14:56:51 +01:00
2026-08-23 18:18:26 +01:00
2026-08-23 01:40:53 +01:00
2026-08-22 21:00:35 +01:00
2026-08-23 22:45:08 +01:00
2026-08-23 22:12:05 +01:00
2026-08-23 12:22:56 +01:00
2026-08-23 01:40:53 +01:00
2026-08-22 23:42:36 +01:00
2026-08-23 02:04:36 +01:00
2026-08-23 01:04:15 +01:00
2026-08-23 09:08:52 +01:00
2026-08-23 22:45:08 +01:00
2026-08-23 01:40:53 +01:00
2026-08-22 21:43:03 +01:00
2026-08-22 23:02:34 +01:00
2026-08-22 23:02:34 +01:00
2026-08-23 02:04:36 +01:00
2026-08-23 09:13:37 +01:00
2026-08-23 22:12:05 +01:00
2026-08-23 17:45:09 +01:00
2026-08-22 20:40:31 +01:00
2026-08-23 22:45:08 +01:00
2026-08-22 23:02:34 +01:00
2026-08-23 18:41:36 +01:00
2026-08-23 14:56:51 +01:00
2026-08-23 19:34:55 +01:00
2026-08-23 19:45:33 +01:00
2026-08-23 01:40:53 +01:00
2026-08-23 17:59:45 +01:00
2026-08-23 22:45:08 +01:00
2026-08-23 09:08:52 +01:00
2026-08-23 14:56:51 +01:00
2026-08-22 23:02:34 +01:00
2026-08-22 23:02:34 +01:00
2026-08-22 21:43:03 +01:00
2026-08-23 18:23:41 +01:00
2026-08-23 19:07:29 +01:00
2026-08-22 23:42:36 +01:00
2026-08-23 01:40:53 +01:00
2026-08-23 14:56:51 +01:00
2026-08-22 19:36:39 +01:00
2026-08-23 22:45:08 +01:00
2026-08-23 18:24:50 +01:00
2026-08-22 21:00:35 +01:00
2026-08-23 18:24:50 +01:00
2026-08-24 12:09:52 +01:00
2026-08-23 17:59:45 +01:00
2026-08-23 16:49:42 +01:00
2026-08-22 23:42:36 +01:00
2026-08-23 22:17:51 +01:00
2026-08-23 14:56:51 +01:00
2026-08-23 18:23:41 +01:00
2026-08-23 17:59:45 +01:00
2026-08-23 18:24:50 +01:00
2026-08-23 18:24:50 +01:00
2026-08-23 22:45:08 +01:00
2026-08-22 23:42:36 +01:00
2026-08-23 19:45:33 +01:00
2026-08-23 02:04:36 +01:00
2026-08-22 23:42:36 +01:00
2026-08-23 09:13:37 +01:00
2026-08-23 16:49:42 +01:00
2026-08-22 22:38:31 +01:00
2026-08-23 22:45:08 +01:00
2026-08-23 09:08:52 +01:00
2026-08-24 11:59:18 +01:00
2026-08-23 19:07:00 +01:00
2026-08-22 23:02:34 +01:00
2026-08-22 23:02:34 +01:00
2026-08-23 02:31:50 +01:00
2026-08-22 23:02:34 +01:00
2026-08-23 01:40:53 +01:00
2026-08-22 23:02:34 +01:00
2026-08-23 18:24:50 +01:00
2026-08-23 18:24:50 +01:00
2026-08-23 19:07:29 +01:00
2026-08-23 14:56:51 +01:00
2026-08-22 23:33:09 +01:00
2026-08-23 22:12:05 +01:00
2026-08-24 11:40:44 +01:00
2026-08-23 09:02:42 +01:00
2026-08-23 18:24:50 +01:00
2026-08-22 22:38:31 +01:00
2026-08-23 16:53:52 +01:00
2026-08-23 17:59:45 +01:00
2026-08-23 01:40:53 +01:00
2026-08-23 19:45:33 +01:00
2026-08-23 16:49:42 +01:00
2026-08-23 22:45:08 +01:00
2026-08-22 20:40:31 +01:00
2026-08-23 19:34:55 +01:00
2026-08-22 21:00:35 +01:00
2026-08-22 23:02:34 +01:00
2026-08-23 01:40:53 +01:00
2026-08-23 16:55:58 +01:00
2026-08-22 21:43:03 +01:00
2026-08-22 21:43:03 +01:00
2026-08-23 09:08:52 +01:00
2026-08-22 22:38:31 +01:00
2026-08-23 16:32:28 +01:00
2026-08-23 01:40:53 +01:00
2026-08-22 23:23:56 +01:00
2026-08-22 23:21:30 +01:00
2026-08-22 23:21:30 +01:00
2026-08-22 23:21:30 +01:00
2026-08-23 16:32:28 +01:00
2026-08-23 17:59:45 +01:00
2026-08-23 14:56:51 +01:00
2026-08-23 01:40:53 +01:00
2026-08-23 09:02:42 +01:00
2026-08-23 22:17:51 +01:00
2026-08-22 21:43:03 +01:00
2026-08-23 17:45:09 +01:00
2026-08-23 19:07:00 +01:00
2026-08-22 23:02:34 +01:00
2026-08-23 02:44:42 +01:00
2026-08-22 23:02:34 +01:00
2026-08-23 17:45:09 +01:00
2026-08-23 01:40:53 +01:00
2026-08-23 18:24:50 +01:00
2026-08-23 22:45:08 +01:00
2026-08-23 00:42:13 +01:00
2026-08-23 19:34:55 +01:00
2026-08-23 22:12:05 +01:00
2026-08-23 18:24:50 +01:00
2026-08-23 17:45:09 +01:00
2026-08-22 22:38:31 +01:00
2026-08-23 09:02:42 +01:00
2026-08-23 16:32:28 +01:00
2026-08-22 20:40:31 +01:00
2026-08-23 14:56:51 +01:00
2026-08-22 20:40:31 +01:00
2026-08-23 22:45:08 +01:00
2026-08-23 02:04:36 +01:00
2026-08-23 16:49:42 +01:00
2026-08-23 22:12:05 +01:00
2026-08-22 23:02:34 +01:00
2026-08-23 18:23:41 +01:00
2026-08-22 23:33:09 +01:00
2026-08-23 22:45:08 +01:00
2026-08-24 12:09:52 +01:00
2026-08-22 22:08:32 +01:00
2026-08-22 22:38:31 +01:00
2026-08-23 14:56:51 +01:00
2026-08-24 11:40:44 +01:00
2026-08-22 23:21:30 +01:00
2026-08-23 17:45:09 +01:00