Skip to content

Handle same track title but different artist scoring better - #245

Open
nironics wants to merge 1 commit into
LumePart:devfrom
nironics:dev
Open

nironics wants to merge 1 commit into
LumePart:devfrom
nironics:dev

Conversation

@nironics

@nironics nironics commented Nov 9, 2026

Copy link
Copy Markdown

Fix wrong-artist matches in library search for Plex

Plex seems to have originalArtist as blank most (maybe all?) times, and it was interfering with the ranking algorithm for tracks that had the same exact name but different artists.

I was specifically hitting this trying to import a playlist with these two tracks I didn't have:

  • "Numb" by Linkin Park
  • "I Will Survive" By Gloria Gaynor

But my library did have "Numb" by Sylvann Esso and "I Will Survive" by CAKE, and those two tracks got placed into the playlist instead of searching for the actually missing tracks.

This PR fixes that bug.

  • Only score artist/album when both sides have a value
  • Don't award the filename bonus when the track has no file (filepath.Base("") is ".")
  • Add TestBestMatchArtist covering these cases

This branch has not been deployed

No deployments
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.

1 participant