Repository navigation
Conversation
| ): Promise<TorrentResult[]> { | ||
| // Search the full Audible title first, then retry without a subtitle. | ||
| // Indexer releases frequently omit subtitles even when Audible includes them. | ||
| const baseTitle = title.split(':')[0].trim(); |
There was a problem hiding this comment.
Nice fix, I ran into the same thing on audible.
The colon split misses titles where audible puts a period after the series number, like Primal Hunter 1. Une aventure de LitRPG. The indexer release is Primal.Hunter.T01..., so the search still returns nothing.
Splitting on a period only when it follows a digit covers that and leaves Mr. Mercedes or Vol. 2 alone:
| const baseTitle = title.split(':')[0].trim(); | |
| const baseTitle = title.split(/:|(?<=\d)\.\s/)[0].trim(); |
Checked in Node 20:
Primal Hunter 1. Une aventure de LitRPG→Primal Hunter 1Dungeon Crawler Carl 4. Le Portail des dieux infernaux→Dungeon Crawler Carl 4Le Nom du Vent 1: Chronique du Tueur de Roi 1.1→Le Nom du Vent 1(same as before)Mr. Mercedes,Dr. Sleep,Vol. 2,Book 1.5 Something→ unchanged
|
Thanks @connor2k, small and correct. And thanks @Eyji for the period-after-number refinement ("Primal Hunter 1. Une aventure de LitRPG"), that's a real gap. I'm folding this into one fix for #316: cleaner query variations (subtitle stripped, punctuation stripped), only sent when the first search doesn't find anything usable so we're not doubling indexer hits on every search. You'll be on it as co-author. |
Retries audiobook searches using the base title when the Audible title contains a colon-delimited subtitle. This handles releases where indexers omit Audible subtitles while preserving the existing full-title searches.