Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/lib/integrations/prowlarr.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,16 @@ export class ProwlarrService {
author: string,
filters?: SearchFilters
): 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();

@Eyji Eyji Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Suggested change
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 1
  • Dungeon Crawler Carl 4. Le Portail des dieux infernaux → Dungeon Crawler Carl 4
  • Le 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


const queries = [
`${title} ${author}`,
title,
...(baseTitle !== title
? [`${baseTitle} ${author}`, baseTitle]
: []),
];

logger.info(`Searching with ${queries.length} query variations`, { queries });
Expand Down