Reconcile episodes that vanish or renumber upstream #122

Closed
opened 2026-08-23 15:55:56 +01:00 by naps62-yolo · 0 comments
Owner

Depends on: #121

TMDB deletes and renumbers episodes. #121 deliberately leaves them alone, so a
removed episode stays wanted forever and holds its series at incomplete.

  • An episode that vanished upstream and has no file is deleted, cascading
    through episode_releases.
  • An episode that vanished upstream and has a file is never deleted. Flag it
    and surface it as a conflict for the operator to resolve. media_files.path
    is unique and the owner is polymorphic, so deleting the row would orphan a
    real file and block re-importing that path — the same trap
    crates/arr-api/src/movies.rs:366 documents on the movie side.
  • Renumbering is the same two cases seen from the other end: the old number
    vanishes and a new one appears. Do not try to match them up. A renumber that
    strands a file shows as a conflict, which is the honest answer.

Nothing here deletes anything from disk.

Depends on: #121 TMDB deletes and renumbers episodes. #121 deliberately leaves them alone, so a removed episode stays wanted forever and holds its series at `incomplete`. - An episode that vanished upstream and has no file is deleted, cascading through `episode_releases`. - An episode that vanished upstream and **has** a file is never deleted. Flag it and surface it as a conflict for the operator to resolve. `media_files.path` is unique and the owner is polymorphic, so deleting the row would orphan a real file and block re-importing that path — the same trap `crates/arr-api/src/movies.rs:366` documents on the movie side. - Renumbering is the same two cases seen from the other end: the old number vanishes and a new one appears. Do not try to match them up. A renumber that strands a file shows as a conflict, which is the honest answer. Nothing here deletes anything from disk.
naps62-yolo added the difficulty/moderatearea/daemonphase/6-tvtype/feature labels 2026-08-23 15:55:56 +01:00
naps62-yolo added this to the TV tracking milestone 2026-08-23 15:58:35 +01:00
naps62-yolo added a new dependency 2026-08-23 16:36:55 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: yolo/arr#122