diff --git a/pkg/wire/torrent.go b/pkg/wire/torrent.go index cfd887b..0815acf 100644 --- a/pkg/wire/torrent.go +++ b/pkg/wire/torrent.go @@ -328,6 +328,17 @@ func (s *Store) updateTorrent(t *Torrent, debridTorrent *types.Torrent) *Torrent t = s.partialTorrentUpdate(t, debridTorrent) t.ContentPath = t.TorrentPath + // When debrid reports download complete and we have a path, mark as ready. + // This is a direct fix for TorBox where IsReady() might fail due to + // progress/AmountLeft calculation issues. + if debridTorrent.Status == "downloaded" && t.TorrentPath != "" { + t.State = "pausedUP" + t.Progress = 1.0 + t.AmountLeft = 0 + s.torrents.Update(t) + return t + } + if t.IsReady() { t.State = "pausedUP" s.torrents.Update(t)