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(import): don't throw away album flexible fields #5388

Merged
merged 2 commits into from
Aug 27, 2024

Conversation

ThinkChaos
Copy link
Contributor

@ThinkChaos ThinkChaos commented Aug 16, 2024

Description

I believe this fixes #4785, but I might be misunderstanding the description and it might already be fixed.

Tagging @JOJ0 since they created both the bug linked above, and 5bf4e3d which mentions it.

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.)

beets/autotag/mb.py Show resolved Hide resolved
test/test_importer.py Outdated Show resolved Hide resolved
@ThinkChaos ThinkChaos force-pushed the fix/save-album-flexible-fields branch from c6dfe1e to dc61ef0 Compare August 21, 2024 21:32
Copy link
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.

Very clean PR, thank you! Added a suggestion, and requesting changes since the PR needs rebasing :)

beets/autotag/mb.py Outdated Show resolved Hide resolved
beets/importer.py Show resolved Hide resolved
docs/changelog.rst Outdated Show resolved Hide resolved
test/test_importer.py Outdated Show resolved Hide resolved
beets/autotag/__init__.py Show resolved Hide resolved
@ThinkChaos ThinkChaos force-pushed the fix/save-album-flexible-fields branch 2 times, most recently from aba5877 to 08bcbd4 Compare August 25, 2024 18:12
@ThinkChaos ThinkChaos requested a review from snejus August 25, 2024 18:13
Copy link
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.

Just a small comment regarding the change in the workflows

.github/workflows/ci.yaml Outdated Show resolved Hide resolved
@ThinkChaos ThinkChaos force-pushed the fix/save-album-flexible-fields branch from 08bcbd4 to c131d5d Compare August 26, 2024 16:55
ThinkChaos and others added 2 commits August 26, 2024 13:06
As noted by 5bf4e3d, MusicBrainz
external IDs (`*_album_id`) were only saved for items and not albums.
This commit addresses that by copying `AlbumInfo` fields to the `Album`,
i.e. what's saved in the DB.
This is similar to how `TrackInfo` fields are copied to `Item` instances
except the copying is done at a different time since we only get an
`Album` much later in the import flow.
Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
@ThinkChaos ThinkChaos force-pushed the fix/save-album-flexible-fields branch from c131d5d to bf32d9a Compare August 26, 2024 17:06
Copy link
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 the adjustments, you're good to go!

@snejus snejus merged commit b236046 into beetbox:master Aug 27, 2024
12 checks passed
@ThinkChaos ThinkChaos deleted the fix/save-album-flexible-fields branch August 27, 2024 14:21
@ThinkChaos
Copy link
Contributor Author

Thanks for the review!

@JOJ0
Copy link
Member

JOJ0 commented Aug 30, 2024

@ThinkChaos thank you very much for this PR! I love the refactoring you did to the *_id fetching code! So much cleaner and shorter now! Also many thanks to @snejus for taking over with a review, much appreciated! ❤️

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

Successfully merging this pull request may close these issues.

Dirty flex attr data_source not actually written to album table
3 participants