github Listenarrs/Listenarr v1.10.16-canary
Canary 1.10.16

pre-releaseone hour ago

Summary

When ImportDownloadFilesAsync refuses an import with ApplicationConflictException, the download processing job is left in Processing for good. The import service throws that exception when an earlier file operation on the same audiobook is unresolved: a registration journal that needs repair, a registration that is still completing or still owns source cleanup, or a move that still owns the audiobook's files (FileRegistrationRecoveryService.RepairState.cs:104-112, MoveQueueService.Recovery.cs:112-131 and :163-165).

ProcessJobAsync only catches InvalidOperationException around the import call (DownloadProcessingJobProcessor.cs:308-313), and ProcessQueueAsync only catches DownloadProcessingException (:117-125). So the conflict escapes both, and the background loop logs it as "Error processing download queue" (:78-81). By then the job has already been marked Processing and the download ImportPending (:215-216). Nothing moves the job after that. GetNextJobAsync only picks Pending jobs, and the one place that resets Processing jobs is the startup block (:44-49). After a restart the job runs once more, the import refuses again, and the job is stuck again.

The same escape shows up in the log in #891 (ApplicationConflictException under "Error processing download queue"). This PR doesn't touch the journal state behind #891. It only makes sure the download job ends instead of hanging.

On one install, 6 jobs ended up like this after an import retry hit "A previously committed file import (...) requires repair before this audiobook's files can be changed". All 6 were Processing with RetryCount 0 and no NextRetryAt, and nothing moves them short of a restart.

Changes

Fixed

  • ApplicationConflictException from the import call now takes the same FailImportAsync path as InvalidOperationException. The job ends Failed with the conflict message as its error, an...

Automated Canary build

Don't miss a new Listenarr release

NewReleases is sending notifications on new releases.