separate Prowlarr audiobook results from ABB#51
Conversation
Retracting — I was wrong. GetSource catches prowlarr_audiobooks via Prowlarr's Name() so the download.go and requests.go literal checks are unreachable for this label. filter.go:155 is a flat-2 priority instead of 1-if-seeded but that only matters for seeded results, not NZBs (this PR's actual target).
JeremiahM37
left a comment
There was a problem hiding this comment.
One more spot to update: internal/search/scorer.go:267 — add "prowlarr_audiobooks" to the audiobook case in guessMediaType, otherwise size scoring falls through to the ebook range and a typical audiobook NZB drops from 10 to 3.
| source := "torrent" | ||
| if p.tab == "audiobook" { | ||
| source = "audiobook" | ||
| source = "prowlarr_audiobooks" |
There was a problem hiding this comment.
Related: internal/search/scorer.go:267 (guessMediaType) still only maps Source=="audiobook" to the audiobook size band. Prowlarr doesn't set MediaType on its results, so prowlarr_audiobooks now falls through to ebook here and a 500MB-2GB audiobook NZB drops from a size score of 10 to 3. Add "prowlarr_audiobooks" to that case too.
What changed
prowlarr_audiobooksinstead ofaudiobook.Why
Librarr already treats
audiobookas the ABB source. That causes Prowlarr audiobook NZB results to be filtered as if they were ABB rows, which drops them when they do not have ABB-specific metadata or seeders.Impact
nzb.lifenow survive librarr's filter path.Validation
go test ./internal/search -run 'TestProwlarr|TestIsNZBURL'GET /api/search/audiobooks?q=The Martian.source: "prowlarr_audiobooks"andindexer: "Nzb.life".