BUG: Download matching and deduplication is fragile (exact title only, no season pack support) #65

Closed
opened 2026-05-28 11:40:28 +01:00 by Gandalf · 0 comments
Owner

Description:

The logic that matches downloads from clients to Sonarr/Radarr/Ombi requests relies on exact title matching and has no special handling for season packs or cross-client deduplication.

Detailed Investigation Findings (release/1.7.31)

Current Implementation:

  • extractArrInfo() (used in most download clients) uses simple regex for series (S##E##) and movies (year in parentheses).
  • Matching in dashboard/history views uses exact title comparison.
  • No use of download IDs, torrent hashes, or Sonarr/Radarr queue IDs for reliable linking.
  • No deduplication when the same download appears in multiple clients or when a season pack creates multiple queue entries.

Impact:

  • Incorrect or duplicate entries in the dashboard.
  • User-specific filtering (based on Sonarr/Radarr tags) fails for season packs.
  • Compounds the season pack queue bug (#61).

Proposed Solution / Fix Plan:

  1. Improve extractArrInfo() across all clients to also capture queueId / torrent hash where available.
  2. Add a centralized matching service that prefers ID/hash matching over title.
  3. Implement deduplication in the history and active downloads views.
  4. Add special handling for season packs (group by series + season or show aggregated progress).

Cross-Dependencies:

  • Directly related to season pack handling (#61). Fixing matching will make the unpacked season pack data useful in the UI.
  • Also benefits webhook reliability (better correlation of webhook events to downloads).

Suggested Labels:
Kind/Bug, Priority: Medium, Area/Matching, Area/History

Affected Versions: All versions.

**Description:** The logic that matches downloads from clients to Sonarr/Radarr/Ombi requests relies on exact title matching and has no special handling for season packs or cross-client deduplication. ### Detailed Investigation Findings (release/1.7.31) **Current Implementation:** - `extractArrInfo()` (used in most download clients) uses simple regex for series (`S##E##`) and movies (year in parentheses). - Matching in dashboard/history views uses exact title comparison. - No use of download IDs, torrent hashes, or Sonarr/Radarr queue IDs for reliable linking. - No deduplication when the same download appears in multiple clients or when a season pack creates multiple queue entries. **Impact:** - Incorrect or duplicate entries in the dashboard. - User-specific filtering (based on Sonarr/Radarr tags) fails for season packs. - Compounds the season pack queue bug (#61). **Proposed Solution / Fix Plan:** 1. Improve `extractArrInfo()` across all clients to also capture `queueId` / torrent hash where available. 2. Add a centralized matching service that prefers ID/hash matching over title. 3. Implement deduplication in the history and active downloads views. 4. Add special handling for season packs (group by series + season or show aggregated progress). **Cross-Dependencies:** - Directly related to season pack handling (#61). Fixing matching will make the unpacked season pack data useful in the UI. - Also benefits webhook reliability (better correlation of webhook events to downloads). **Suggested Labels:** Kind/Bug, Priority: Medium, Area/Matching, Area/History **Affected Versions:** All versions.
Gandalf added the Kind/Bug
Priority
Medium
3
Area/MatchingArea/History
labels 2026-05-28 11:40:28 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Gandalf/sofarr#65