Skip to content

DlgPrefLibrary: add option to reset missing tags on import - #16788

Open
gary-gdbsystems wants to merge 2 commits into
mixxxdj:mainfrom
gary-gdbsystems:library-reset-missing-tags-pref
Open

DlgPrefLibrary: add option to reset missing tags on import#16788
gary-gdbsystems wants to merge 2 commits into
mixxxdj:mainfrom
gary-gdbsystems:library-reset-missing-tags-pref

Conversation

@gary-gdbsystems

@gary-gdbsystems gary-gdbsystems commented Jul 29, 2026

Copy link
Copy Markdown

Summary

Resolves #11241.

The ResetMissingTagMetadataOnImport behavior already exists in the backend — DlgTrackInfo::slotImportMetadataFromFile() reads kResetMissingTagMetadataOnImportConfigKey directly — but there was no UI to enable it. As reported, this meant "Import From File Tags" would not clear a library field such as Album Artist after it had been emptied in another tag editor.

Per @uklotzde in the issue thread, the only missing piece was "a UI option for kResetMissingTagMetadataOnImportConfigKey" — this PR adds exactly that.

Approach

Add a standalone checkbox "Reset missing metadata fields when reimporting from file tags" to Library preferences → Track Metadata Synchronization, bound to the existing config key:

  • loaded in slotUpdate()
  • saved in slotApply()
  • reset in slotResetToDefaults()

The manual import path reads the key directly and is not gated on kSyncTrackMetadataConfigKey, so this is an independent option rather than a sub-option of "Synchronize library track metadata".

Changes

  • src/preferences/dialog/dlgpreflibrarydlg.ui — new checkbox in the metadata group.
  • src/preferences/dialog/dlgpreflibrary.cpp — load/save/default wiring.

Screenshots

Before — sync / Serato / relative paths:

before

After — adds “Reset missing metadata fields when reimporting from file tags”:

after

Testing

  • Builds cleanly (incl. uic regeneration of the dialog).
  • clang-format and the other pre-commit hooks pass.
  • Verified the new checkbox renders in the correct position within the metadata group.

The ResetMissingTagMetadataOnImport behavior already existed
(DlgTrackInfo::slotImportMetadataFromFile reads the config key
directly), but there was no UI to enable it. As a result "Import From
File Tags" would not clear library fields such as Album Artist that had
been emptied by another tag editor.

Add a standalone checkbox in Library preferences (Track Metadata
Synchronization) bound to kResetMissingTagMetadataOnImportConfigKey:
loaded in slotUpdate(), saved in slotApply(), reset in
slotResetToDefaults(). The manual import path reads the key directly and
is not gated on metadata syncing, so this is an independent option
rather than a sub-option of "Synchronize library track metadata".

As requested by the maintainers in mixxxdj#11241, whose remaining
work was exposing this existing config key in the UI.

Resolves mixxxdj#11241.
@ronso0 ronso0 added the AI The issue or PR makes heavy use of AI, which requires extra attention and effort to review label Jul 29, 2026
The new checkbox was missing from the dialog's explicit <tabstops>
order, so keyboard Tab navigation skipped it. Insert it between the
Serato and relative-path checkboxes to match its visual position.
@gary-gdbsystems
gary-gdbsystems force-pushed the library-reset-missing-tags-pref branch from d9811bb to 995be45 Compare August 11, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI The issue or PR makes heavy use of AI, which requires extra attention and effort to review preferences ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Existing "Album Artist" will not be cleared by "Import From File Tags" when that field is cleared by another tag editor

2 participants