Skip to content

Track downloads by infohash - #27

Merged
JeremiahM37 merged 1 commit into
JeremiahM37:mainfrom
vedhavyas:store-infohash-on-job
Aug 19, 2026
Merged

Track downloads by infohash#27
JeremiahM37 merged 1 commit into
JeremiahM37:mainfrom
vedhavyas:store-infohash-on-job

Conversation

@vedhavyas

Copy link
Copy Markdown
Contributor

A torrent job records only the release title, so the only handle back to the download is a fuzzy title match against the client's torrent list, matching when either string contains the other, lowercased. Real release names don't survive that. Two that missed for me:

  • stored Terraria (v1.4.5.0 + Bonus OST, MULTi9) [FitGirl Repack] against qBittorrent's Terraria [FitGirl Repack]
  • stored Papers, Please v1.2.70 against Papers.Please.v1.2.70.rar

Both jobs sat at downloading indefinitely while the download itself finished and got picked up by the completed-torrent watcher instead, leaving an extra orphaned row per grab. Matching in either direction also means Hitman matches Hitman.2.Gold.Edition-CODEX, so a job can attach itself to a different game's torrent.

The infohash is already parsed out of the Prowlarr response and carried on the download request, it just never reaches the job. This stores it and matches on it where a row has one, falling back to the title for rows created before the change. It pairs with #26: once tracking works the job's platform is actually used, so a PC game tagged 4050 would file as Switch until that one lands too.

@JeremiahM37 JeremiahM37 self-assigned this Aug 19, 2026
@JeremiahM37
JeremiahM37 merged commit 958b4fd into JeremiahM37:main Aug 19, 2026
3 checks passed
JeremiahM37 added a commit to vedhavyas/gamarr that referenced this pull request Aug 19, 2026
JeremiahM37#27, JeremiahM37#28 and JeremiahM37#29 landed while this was open. Two collisions:

- JeremiahM37#29's TestDownloadTorrentFileListScanDisabled still calls
  DownloadTorrent with the pre-JeremiahM37#27 five-argument signature, so main
  does not currently compile under test. Fixed here.
- JeremiahM37#29's test and the two added by the previous commit both append to
  manager_test.go; kept both.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants