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

Do not save missing tracks to prevent inconsistent metadata #3811

Merged
merged 4 commits into from
May 1, 2021
Merged

Do not save missing tracks to prevent inconsistent metadata #3811

merged 4 commits into from
May 1, 2021

Conversation

uklotzde
Copy link
Contributor

The metadata of tracks in the database should not be modified as long as they are missing to prevent inconsistencies with the file metadata. This will become an issue soon (when synchronizing custom genre/mood tags with metadata).

Other changes:

  • Return more meaningful results when saving tracks
  • Perform checks behind the internal API in TrackCollectionManager and use debug assertions in TrackDAO

The metadata of tracks in the database should not be modified as long
as they are missing to prevent inconsistencies with the file metadata.
This will become an issue soon.

Other changes:
- Return more meaningful results when saving tracks
- Perform checks behind the internal API in TrackCollectionManager and
  use debug assertions in TrackDAO
@Holzhaus
Copy link
Member

Makes sense. Should this go into 2.3?

@uklotzde
Copy link
Contributor Author

Makes sense. Should this go into 2.3?

No. It is not an issue yet and would cause merge conflicts. Main has already advanced in track management.

@uklotzde
Copy link
Contributor Author

One edge case is that you edit track properties and then unmount the drive with the track file before the track has been saved.

Unfortunately, synchronizing the genre/mood tag with custom tags causes tracks to become dirty without manual editing. This could happen with any data migration that is performed lazily at runtime. Better be restrictive and discard pending changes in this rare edge case instead of risking inconsistencies.

Copy link
Member

@daschuer daschuer left a comment

Choose a reason for hiding this comment

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

Two minor comments, than LGTM

Thank you.

src/library/dao/trackdao.cpp Outdated Show resolved Hide resolved
src/library/trackcollectionmanager.cpp Outdated Show resolved Hide resolved
@daschuer
Copy link
Member

daschuer commented May 1, 2021

Thank you.

@daschuer daschuer merged commit 73a5e66 into mixxxdj:main May 1, 2021
@uklotzde uklotzde deleted the save-track-result branch May 1, 2021 22:25
daschuer added a commit to daschuer/mixxx that referenced this pull request Aug 18, 2021
Co-authored-by: Jan Holthuis <holthuis.jan@googlemail.com>
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.

3 participants