-
-
Notifications
You must be signed in to change notification settings - Fork 98
fix: different tracks with the same title, excluding special characters, were deduplicated from the album #428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR attempts to fix a bug where tracks with the same title (excluding special characters) are incorrectly deduplicated from albums. The issue is demonstrated with Pink Floyd's "The Wall" album, where "In the Flesh?" (Disc 1, Track 1) and "In the Flesh" (Disc 2, Track 8) are treated as duplicates because the hash function strips non-alphanumeric characters.
Key Changes:
- Modified
recreate_trackhash()method to include track and disc numbers in the hash calculation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
…rs, were deduplicated from the album
|
There was also an inconsistency with the hashing in taglib.py, the arguments were passed in a different order, that is now resolved too |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
What kind of change does this PR introduce? (check at least one)
The PR fulfills these requirements:
fix #xxx[,#xxx], where "xxx" is the issue number)If adding a new feature, the PR's description includes:
Other information:
I have an album in my library the contents of which look like this:
There are two tracks,
01. In the Flesh?on Disc 1 and08. In the Fleshon Disc 2. However, in SwingMusic only the second track appears:As I discovered, this happens because the track hashes are identical for both tracks, even though the songs are different. The reason is that the hashing function ignores non-alphanumeric characters in the title, which generally makes sense but causes a bug in albums like this.
In this case, it might be enough to track only the track number, but in the worst-case scenario there may be albums where songs share the same track numbers across different discs, so I think it makes sense to include the disc number in the hash as well.