You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] TorBox: download fails on first poll when finished but not yet present #1403
With TorBox as the torrent client, a download can fail on its first status poll with TorBox finished processing but the download is unavailable, even though TorBox completes it a few seconds later. Requesting the same release again then works immediately.
finished=torrent.get("download_finished") isTruepresent=torrent.get("download_present") isTrueiffinishedandnotpresent:
message="TorBox finished processing but the download is unavailable"self._set_error(state, message)
returnDownloadStatus.error(message)
For a torrent TorBox already has cached, download_finished can be true a moment before download_present becomes true. That window is normal, but this branch treats it as terminal on the first poll it sees it, so the task errors out instead of polling again.
Steps To Reproduce
Configure TorBox as the torrent client and AudiobookBay as a source.
Download an audiobook release (cached on TorBox).
About 10-20 s after Added torrent to TorBox, the task fails with the message above and cleanup is skipped.
Query TorBox GET /v1/api/torrents/mylist?id=<id>: the same torrent now shows download_state: completed, download_finished: true, download_present: true, progress: 1.
Request the same release again: it completes and imports normally.
Seen on two different releases in a row (TorBox ids created 2 minutes apart), both failing within ~20 s of being added and both showing as complete and present on TorBox straight afterwards.
Expected Behavior
finished and not present is treated as still processing (keep polling, with a timeout), and only becomes an error if the file never becomes present.
Debug Information
Log excerpt:
INFO torbox.py:167 - Added torrent to TorBox: ID 107108061
INFO base_handler.py:871 - Added to torbox: 107108061 for 'Artemis'
ERROR base_handler.py:1006 - Download 107108061 error state: TorBox finished processing but the download is unavailable
INFO base_handler.py:426 - Skipping download client cleanup for protocol=torrent after download error (client=torbox id=107108061)
Activity
calibrain commentedon Oct 3, 2026
Fixed in #1422