Skip to content

fix: use MaM's tor[searchType] parameter for filter options - #806

Open
TheRealNoob wants to merge 1 commit into
Listenarrs:canaryfrom
TheRealNoob:fix/mam-filter-search-type-param
Open

fix: use MaM's tor[searchType] parameter for filter options#806
TheRealNoob wants to merge 1 commit into
Listenarrs:canaryfrom
TheRealNoob:fix/mam-filter-search-type-param

Conversation

@TheRealNoob

Copy link
Copy Markdown

Summary

Fixes #805

All MaM filter options (Active, Freeleech, Freeleech or VIP, VIP only, Not VIP) were silently broken. Listenarr was sending unrecognised boolean parameters that MaM ignores, returning unfiltered results regardless of the configured setting.

MaM's API uses a single tor[searchType] parameter with specific string values for content filters. This PR replaces the five separate boolean parameters with the correct values, matching Prowlarr's working implementation as a reference.

Filter Before (broken) After (fixed)
Active tor[onlyActive]=1 tor[searchType]=active
Freeleech tor[onlyFreeleech]=1 tor[searchType]=fl
Freeleech or VIP tor[freeleechOrVip]=1 tor[searchType]=fl-VIP
VIP only tor[onlyVip]=1 tor[searchType]=VIP
Not VIP tor[notVip]=1 tor[searchType]=nVIP

Test plan

  • Configure MaM indexer with Not VIP filter
  • Search for a title with both VIP and non-VIP results on MaM (e.g. Ready Player Two by Ernest Cline)
  • Confirm only non-VIP results are returned
  • Repeat for other filter values (Freeleech, VIP only, etc.)

Empirically confirmed on canary: Not VIP filter returned 5 results (including 3 VIP) before this fix, and 1 result (non-VIP only) after.

🤖 Generated with Claude Code

All filter options (Active, Freeleech, FreeleechOrVip, Vip, NotVip) were
sending unrecognised boolean parameters that MaM silently ignores, causing
filters to have no effect on search results.

MaM's API uses a single tor[searchType] parameter with specific string
values. Replace the five separate boolean parameters with the correct
tor[searchType] values matching Prowlarr's working implementation:

  Active         -> tor[searchType]=active
  Freeleech      -> tor[searchType]=fl
  FreeleechOrVip -> tor[searchType]=fl-VIP
  Vip            -> tor[searchType]=VIP
  NotVip         -> tor[searchType]=nVIP

Empirically confirmed: Not VIP filter now returns 1 result instead of 5
(including 3 VIP torrents) for the same query.

Fixes Listenarrs#805
@TheRealNoob
TheRealNoob requested a review from a team August 9, 2026 03:41
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.

MaM filter options (Not VIP, Freeleech, etc.) have no effect — wrong API parameter names sent to MaM

1 participant