No log entry or history event when an import is blocked by the ID-match guard
Is there an existing issue for this?
- I have searched the existing open and closed issues
Current Behavior
When a completed download is blocked by the ID-match guard in CompletedDownloadService.cs:116:
if (seriesMatchType == SeriesMatchType.Id && releaseSource != ReleaseSourceType.InteractiveSearch)
{
trackedDownload.Warn("Found matching series via grab history, but release was matched to series by ID. Automatic import is not possible. See the FAQ for details.");
SetStateToImportBlocked(trackedDownload);nothing is recorded anywhere durable:
- No NLog entry at any level, including Trace.
TrackedDownload.Warn()only formats the message into an in-memoryStatusMessagesarray; it never logs. - No history event.
HistoryandDownloadHistorykeep only the originalgrabbedrow, exactly as if the download were still running. ManualInteractionRequiredEventis referenced in exactly two places inNzbDrone.Core:CompletedDownloadServicepublishes it, andNotificationServicehandles it. With no connector implementingOnManualInteractionRequired, nothing is emitted at all.
The only trace is the queue item in the UI. Once the download client removes the torrent (share ratio / seeding time limit), the queue item disappears and no record survives that the download ever completed, or why it was not imported.
Sonarr already warns that this situation is hazardous (DownloadClientRemovesCompletedDownloadsCheck), which makes the silence worse — the precise event that health check exists for is the one event that produces no log line.
Note: this is not #6873 (tracked state, since addressed by ImportBlocked), and it is not #4935 (request for an opt-out, settled). I am not asking for the guard to be removed or made configurable. I am asking for its decisions to be observable.
Expected Behavior
A completed download that Sonarr deliberately declines to import should leave a durable trace. In order of preference:
- A history event, so the decision remains visible in Activity -> History after the queue item is gone. This is what survives download-client cleanup.
- At minimum, a single
Warnlog line naming the download and the reason.
Steps To Reproduce
- Serve a Torznab feed containing one item whose title matches no series in the library, but which carries a correct
<torznab:attr name="tvdbid" value="..."/>for a monitored series. - Add it as an indexer and trigger a search so
releaseSourceis notInteractiveSearch. - Sonarr grabs it; the
grabbedhistory entry recordsseriesMatchType: Id. - Let the download complete.
GET /api/v3/queueshowstrackedDownloadState: importBlocked,trackedDownloadStatus: warning, with the message above instatusMessages.- Search the logs at Trace level for the download name: no line mentions the block.
HistoryandDownloadHistorycontain only thegrabbedrow.
Environment
- OS: Ubuntu 24.04, Docker (linuxserver.io image)
- Sonarr: 4.0.19.2979
- Download client: qBittorrent
- Database: SQLiteWhat branch are you running?
Main
Trace Logs?
Disclosure on evidence. I reproduced this end to end on Radarr, which carries the identical guard, and filed Radarr/Radarr#11727 with a full trace log: https://gist.github.com/noebourdin/c985e757f9708a234ae000049ee11bd9
I have not reproduced it on Sonarr. What I did verify directly in Sonarr's source is everything the silence depends on, quoted above: the guard at CompletedDownloadService.cs:116, TrackedDownload.Warn() not logging, and ManualInteractionRequiredEvent having NotificationService as its only consumer. If a Sonarr-side reproduction would help, I am happy to produce one and add it here.
Supporting data point from my own install: across all grab history, (seriesMatchType: Id, releaseSource: InteractiveSearch) appears 10 times — all exempted by the guard — and (Id, Search) appears 0 times. The guard has simply never fired here, which is why the silence went unnoticed on Sonarr while it cost me 44 GB on Radarr.
Source: Sonarr/Sonarr