Sort Fix modal results to prioritize standard album versions

Discovery Fix modal search results now sort standard album versions
above live recordings, remixes, covers, soundtracks, remasters,
deluxe editions, and other variants. Fixes cases where searching
"Mother Danzig" returned a live version first, or "Even Flow Pearl
Jam" returned a soundtrack instead of the original from Ten.
This commit is contained in:
Broque Thomas 2026-04-19 17:21:02 -07:00
parent a3c8b9ecdd
commit 5b9c9bc6fa
3 changed files with 12 additions and 0 deletions

View file

@ -22529,6 +22529,7 @@ def get_version_info():
"• Reject Qobuz 30-second sample/preview downloads",
"• Fix library page crash on All filter — non-string soul_id broke card rendering",
"• Auto Wing It fallback for failed discovery — unmatched tracks download via Soulseek with raw metadata",
"• Smarter Fix modal results — standard album versions sorted above live/remix/cover/soundtrack variants",
"• Unmatch discovery tracks — red ✕ button to remove bad matches from playlist discovery",
"• Customizable music video naming — path template with $artist, $title, $year variables",
"• Fix soulseek log spam when not configured as download source",

View file

@ -3602,6 +3602,7 @@ const WHATS_NEW = {
'2.33': [
// --- April 19, 2026 ---
{ date: 'April 19, 2026' },
{ title: 'Smarter Fix Modal Search Results', desc: 'The discovery Fix modal now sorts search results to prioritize standard album versions over live recordings, remixes, covers, soundtracks, remasters, and deluxe editions. Previously the first result was often a live or remix version instead of the original studio track' },
{ title: 'Unmatch Discovery Tracks', desc: 'Found tracks in playlist discovery now have a red ✕ button to remove the match. Sets the track back to Not Found so it won\'t be downloaded. For mirrored playlists, the unmatch persists in the DB and is respected on re-discovery runs' },
{ title: 'Customizable Music Video Naming', desc: 'Music video file naming is now configurable via a path template in Settings → Library → Paths & Organization. Default unchanged (Artist/Title-video.mp4). Remove "-video" from the template to get clean filenames. Available variables: $artist, $artistletter, $title, $year', page: 'settings' },
{ title: 'Fix Soulseek Log Spam', desc: 'The "Clean Search History" automation no longer tries to connect to slskd when Soulseek is not the active download source, eliminating noisy connection error logs for users who don\'t use Soulseek' },

View file

@ -19418,6 +19418,16 @@ function renderDiscoveryFixResults(tracks, fixModalOverlay) {
const resultsContainer = fixModalOverlay.querySelector('#fix-modal-results');
resultsContainer.innerHTML = '';
// Sort: standard album versions first, live/remix/cover/soundtrack last
const _variantPattern = /\b(live|remix|remaster|refix|cover|acoustic|demo|instrumental|radio edit|single version|deluxe|edition|soundtrack|from .* film|from .* movie|bonus track)\b|\b\w+ mix\b/i;
const _albumVariantPattern = /\b(live|greatest hits|best of|collection|compilation|soundtrack|from .* film|from .* movie|remaster|deluxe|redux|expanded|anniversary)\b/i;
tracks.sort((a, b) => {
const aVariant = _variantPattern.test(a.name || '') || _albumVariantPattern.test(a.album || '');
const bVariant = _variantPattern.test(b.name || '') || _albumVariantPattern.test(b.album || '');
if (aVariant !== bVariant) return aVariant ? 1 : -1;
return 0; // preserve original order within same category
});
tracks.forEach(track => {
const card = document.createElement('div');
card.className = 'fix-result-card';