Skip to content

fix(mbsync): do not clear metadata if import.from_scratch is set#6625

Merged
snejus merged 1 commit into
beetbox:masterfrom
ShimmerGlass:mbsync-from-scratch
May 13, 2026
Merged

fix(mbsync): do not clear metadata if import.from_scratch is set#6625
snejus merged 1 commit into
beetbox:masterfrom
ShimmerGlass:mbsync-from-scratch

Conversation

@ShimmerGlass
Copy link
Copy Markdown
Contributor

Description

if import.from_scratch was set in the config, runnning mbsync would clear any metadata not provided by MBz (replay gain, lyrics, genres...). we now ignore this setting when running mbsync to preserve metadata.

Fixes: #6613

To Do

  • Documentation. (If you've added a new command-line flag, for example, find the appropriate page under docs/ to describe it.)
  • Changelog. (Add an entry to docs/changelog.rst to the bottom of one of the lists near the top of the document.)
  • Tests. (Very much encouraged but not strictly required.)

@ShimmerGlass ShimmerGlass requested a review from a team as a code owner May 11, 2026 07:22
@github-actions github-actions Bot added the mbsync mbsync plugin label May 11, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 11, 2026

Codecov Report

❌ Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 72.39%. Comparing base (0309096) to head (65ccaf1).

Files with missing lines Patch % Lines
beetsplug/bpsync.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6625   +/-   ##
=======================================
  Coverage   72.38%   72.39%           
=======================================
  Files         159      159           
  Lines       20645    20649    +4     
  Branches     3269     3270    +1     
=======================================
+ Hits        14944    14948    +4     
  Misses       4976     4976           
  Partials      725      725           
Files with missing lines Coverage Δ
beets/autotag/hooks.py 98.90% <100.00%> (+0.01%) ⬆️
beetsplug/mbsync.py 82.50% <100.00%> (ø)
beetsplug/bpsync.py 21.83% <0.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

@snejus snejus left a comment

Choose a reason for hiding this comment

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

Thanks for addressing this. I agree that we should ignore import.from_scratch configuration when we synchronise data.

I've seen multiple new issues and discussions created due to this problem, so this has definitely been causing confusion to people.

Maybe worth updating bpsync plugin as well, for consistency?

@ShimmerGlass ShimmerGlass force-pushed the mbsync-from-scratch branch from 60623c5 to b3f9b9e Compare May 13, 2026 15:59
@ShimmerGlass
Copy link
Copy Markdown
Contributor Author

@snejus done

if import.from_scratch was set in the config, runnning mbsync would
clear any metadata not provided by MBz (replay gain, lyrics, genres...).
we now ignore this setting when running mbsync to preserve metadata.

Fixes: beetbox#6613
@ShimmerGlass ShimmerGlass force-pushed the mbsync-from-scratch branch from b3f9b9e to 65ccaf1 Compare May 13, 2026 16:06
@snejus snejus merged commit 544d45a into beetbox:master May 13, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mbsync mbsync plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mbsync: running mbsync will override tags set by replaygain and lyrics

2 participants