[BUG] MyAnonaMouse search turns a curly apostrophe into a space, so titles with ’ are never found

Open Beginner friendly
#379 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
74/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
csharp, docker, sqlite
Domain
backend, search

Research direction

Start by locating the MyAnonaMouse search code that normalizes apostrophes; the trace names MAM_SEARCH_APOSTROPHE_NORMALIZED and shows curly quotes becoming spaces. Check the search tests or add a case for ’ and ‘ in a title and author. Done means the query uses a straight apostrophe and MAM can match both straight and curly apostrophe titles.

Written by the indexing model from the issue text.

Description

Describe the bug
When a book title contains a curly apostrophe (U+2019 ’), the MyAnonaMouse search replaces it with a space before querying. It’s Beginning to Look a Lot Like Murder becomes It s Beginning to Look a Lot Like Murder. MAM's full-text search does not match It s against torrents whose title uses ’, so the correct release is never returned. If another book with the same title uses a straight apostrophe, that one is returned instead and then correctly rejected as an author mismatch, so the search ends with nothing grabbable.

Trace log from 0.9.965 (search terms are identical in shape on 0.9.1000, see below):

MAM_SEARCH_APOSTROPHE_NORMALIZED: title 'It’s Beginning to Look a Lot Like Murder' -> 'It s Beginning to Look a Lot Like Murder', author 'Ally Carter' -> 'Ally Carter'
MAM_SEARCH_TERM: 'It s Beginning to Look a Lot Like Murder Ally Carter' (decoded from: 'It’s+Beginning+to+Look+a+Lot+Like+Murder') [tier 1]
MAM_SEARCH_FALLBACK_TERM: 'It s Beginning to Look a Lot Like Murder' (title-only fallback) [tier 2]
Search tier 1/2 returned 0 release(s), trying the next tier
Search tier 2/2 returned 1 release(s), skipping the remaining tiers
Result #1: Title='It's Beginning to Look a Lot Like Murder', Author='Maria DiRico'

To Reproduce

  1. Add Ally Carter, It’s Beginning to Look a Lot Like Murder (Kiss, Merry, Kill #2, 2026), audiobook. The metadata title uses ’.
  2. Interactive Search the audiobook with MyAnonaMouse as the indexer.
  3. Only other authors' books with the same title appear (Maria DiRico, Jeff Markowitz), all rejected as author mismatch. Ally Carter's audiobook, which is on MAM (Audiobooks, 87 seeders, uploaded 2026-10-13), never appears.

What MAM actually matches
I sent the same loadSearchJSONbasic.php payload Chaptarr uses (srchIn title/author/narrator/series/tags, main_cat 13, browse_lang 1, searchType all) with different text:

tor.text Ally Carter release returned?
It s Beginning to Look a Lot Like Murder (current behaviour) No
Its Beginning to Look a Lot Like Murder No
It’s Beginning to Look a Lot Like Murder Yes
It's Beginning to Look a Lot Like Murder Yes
Beginning to Look a Lot Like Murder Yes

A straight apostrophe matches both straight and curly titles on MAM. Splitting on the apostrophe (It s) or dropping it (Its) does not.

Expected behavior
Normalize ’ (and ‘) to a straight ' instead of a space, so the query is It's Beginning to Look a Lot Like Murder. That matches releases with either apostrophe style. If the space is there for some other reason, a fallback tier that keeps the apostrophe would also fix it.

Scope
Any book whose metadata title (or author) contains ’ is affected. Contractions and possessives are common, so this probably hides a fair number of releases.

System Information:

  • OS: Ubuntu (LXC), Docker
  • Chaptarr Version: reproduced on 0.9.965.0 (trace above); still reproduces on 0.9.1000.0 (develop)
  • Installation Method: Docker (robertlordhood/chaptarr:develop)
  • Database: SQLite

Additional context
On 0.9.1000 the interactive search now returns Jeff Markowitz (0 seeders) and Maria DiRico but still not Ally Carter. That set is exactly what MAM returns for It s Beginning to Look a Lot Like Murder, so the normalization looks unchanged. I couldn't capture a trace on 0.9.1000 because saving the log level now requires Allowed Hosts to be set first.

Dominant language
C#
Stars
664
Forks
48
Avg merge
5h 47m
Merged PRs (30d)
4

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Chaptarr/chaptarr

All issues in Chaptarr/chaptarr

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.