Skip to content

Add multi-artist search fallback - #207

Draft
JustinPerlman wants to merge 4 commits into
fiso64:masterfrom
JustinPerlman:feature/multi-artist-search-fallback
Draft

Add multi-artist search fallback#207
JustinPerlman wants to merge 4 commits into
fiso64:masterfrom
JustinPerlman:feature/multi-artist-search-fallback

Conversation

@JustinPerlman

Copy link
Copy Markdown

Fixes #206

Summary

  • Keep the combined artist and title search as the first attempt.
  • When it returns no results, retry with each artist split on semicolon, comma, or ampersand.
  • Stop retrying after the first artist search returns results.
  • Preserve the original SongQuery artist metadata for result handling.

Tests

  • Added a regression test covering the reported multi-artist case.

@JustinPerlman
JustinPerlman marked this pull request as draft September 2, 2026 22:25

@JustinPerlman JustinPerlman left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Hmm... still seeing issues with songs where the name of the song is also the album title. Pretty common for singles (album has one song it and the the song and album are named the same)

Examples:
Knock2 nolimit (not a single but the album has the same name)
Henry Fong;Knock2;General Degree - What's the Move (feat. General Degree) (single)

@JustinPerlman JustinPerlman left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Knock2;Warren Hue;Holly;PIAO - shyne 4 me (feat. PIAO)
John Summit;Sub Focus;Julia Church - Go Back (feat. Julia Church)
ISOxo;Knock2 - Beam (Knock2 Remix)
John Summit;Kaskade;Julia Church - Resonate (feat. Julia Church)
John Summit;Echoes;Aaron Hibell - Human (feat. Echoes) - Aaron Hibell Remix

These all failed as well. These examples point to a second shared failure: the fallback artist query still includes the featured-artist text in the title, so it asks Soulseek to match every token, including names that may not appear in the shared filename.

@fiso64

fiso64 commented Sep 3, 2026

Copy link
Copy Markdown
Owner

I agree on fallbacks but I'd rather solve this as a more coherent fallback strategy than bolt on special cases to RunSearches.

We already have --desperate, so I'd replace that bool flag with --desperate-level <int> levels.

  • level 0: normal search only
  • level 1 (default): retry with the primary/extracted artist, and apply RemoveFt() to artist/title for that search attempt regardless of the global --remove-ft setting
  • level 2: additionally try the other extracted artists individually
  • level 3: the current --desperate behavior (broader searches such as dropping artist/title constraints, relaxing length, etc.)

(These should be cumulative, I can't think of a reason you'd want level 2/3 without trying the cheaper and more specific level 1 first.)

That addresses both the original multi-artist issue and the (feat. X) failures. Beam (Knock2 Remix) isn't a title-cleaning issue, we should keep remix/version information, otherwise we risk finding the original instead.

The only problem with extracting the artist is of course that we will inevitably run into cases where artist names themselves contain commas and ampersands (chatgpt gave Simon & Garfunkel and Tyler, the creator as examples), so I wonder if we should only split by ; by default (artist names rarely contain a semicolon), and maybe introduce an option to split by other chars.

I also don't think Album == Title => ignore length tolerance is justified. Album/title equality has nothing to do with inaccurate duration metadata; length relaxation belongs with the more desperate fallback behavior.

Implementation-wise, I'd prefer some kind of a small search-attempt planner that generates ordered variants (network query + attempt-specific matching/condition overrides), dedupes equivalent attempts, and executes them up to the configured level.

Aside from that, there is still the question of what we should do for result ranking.

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.

Feature Request: Primary artist extraction and delimiter cleaning for multi-artist search queries

2 participants