-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stop perpetually writing
mb_artistid
, mb_albumartistid
and `album…
…types` fields (#5540) This PR fixes an issue where the `beet write` command repeatedly shows differences for certain fields (`mb_artistid`, `mb_albumartistid`, `albumtype`) even after writing the tags. This happens because these fields are actually stored as lists in the media files (`mb_artistids`, `mb_albumartistids`, `albumtypes`), but beets maintains both single and list versions in its database. This PR addresses this issue in a non-invasive way: the fix ensures consistency between single fields and their list counterparts by: 1. When setting a single field value, making it the first element of the corresponding list 2. When setting a list, using its first element as the single field value This resolves long-standing issues #5265, #5371, and #4715 where users experienced persistent "differences" in these fields despite writing tags multiple times. Changes: - Added `ensure_consistent_list_fields()` function to synchronize field pairs - Applied this function during metadata application - Added tests for all field combinations Fixes #5265, #5371, #4715 **Note**: your music needs to be reimported with `beet import -LI` or synchronised with `beet mbsync` in order to fix these fields!
- Loading branch information
Showing
4 changed files
with
97 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters