Skip to content
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

Fix loading the wrong track via drag and drop and fix wrong DEBUG_ASSERT #13708

Open
wants to merge 8 commits into
base: 2.4
Choose a base branch
from

Conversation

daschuer
Copy link
Member

@daschuer daschuer commented Sep 29, 2024

This fixes handling with duplicated tracks #13706. Now an attempt for caching two tracks with different locations referencing the same file are reliably detected and rejected the situation is reported as warning, and does no longer violates assertions.

This has been tested on Ubuntu focal using a symlink
ln -s track.mp3 symlink.mp3

The related issues showing the empty property page and overwriting thee symlink #13707 are still pending, work is in progress.

The ID is the unique ID which is always returned. When finding a track by canonical location, without an ID, verify that the location stored in the database which can contain symlinks is also matching. If not a different track referencing that same file is already cached and we need to return null to not introduce a data race.

This avoids the issue that wrong track can be returned when using drag and drop.
…() by a proper handling of GlobalTrackCacheLookupResult.
…eady a more significant warning about the dupicate situation.
@ronso0 ronso0 linked an issue Sep 29, 2024 that may be closed by this pull request
@ronso0
Copy link
Member

ronso0 commented Sep 29, 2024

Looks like this fixes #13540 (and #13140)

Co-authored-by: ronso0 <[email protected]>
@ronso0
Copy link
Member

ronso0 commented Sep 29, 2024

Just an idea how to allow users fixing the situation in Mixxx:

  • in case we manage to display an error dialog, we could allow showing both tracks in the tracks view via an OR search for both track ids (or more, maybe a file has already been added a third or forth time) with Library::searchTracksInCollection(QStringLiteral("id:trackId1 | id:trackId2"));
  • users can now merge metadata and purge the obsolete track
  • maybe allow replacing the obsolete track with the original in playlists and crates, incl. history

@daschuer
Copy link
Member Author

daschuer commented Oct 1, 2024

Sounds good. Can we merge this now since this is IMHO a 2.4.2 bug fix.

@daschuer
Copy link
Member Author

daschuer commented Oct 6, 2024

I consider this ready for merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DEBUG ASSERT with two symlinked tracks
2 participants