fix: reopen the gap for a grab whose torrent vanished #98
Reference in New Issue
Block a user
Delete Branch "issue/86-vanished-torrent"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #86.
A grab in
sentordownloadedstate whose infohash Transmission no longer reports (removed by hand) is now markedvanished— a state distinct fromfailedso it does not feed theneeds_decisionattention queue — and the movie, episode, or season it targets reopens as a gap. Nothing is blacklisted, since the release itself never failed policy.Reclaiming the gap means the same release can legitimately be grabbed again, which collides with the old dead row on
grabs.infohash's uniqueness constraint. The insert insend_winnernow upserts over avanishedrow instead of only oversent/downloaded(the restart case), so a re-grab reclaims the row rather than silently losing state.crates/arr-daemon/src/grab.rs'sreopen_targetis shared by bothgrab.rs(asentgrab vanishing before it ever downloaded) andimport.rs(adownloadedgrab vanishing before import).Migration 0011 adds
vanishedto thegrabs.stateCHECK constraint.