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

modify: don't require -a for album-level fields #561

sampsyo opened this issue Mar 1, 2014 · 0 comments


None yet
1 participant
Copy link

commented Mar 1, 2014

The update command (along with the mbsync) plugin spends a good amount of hairy code on keeping album-level fields in sync with item-level fields. This should be cleaned up, "librarized", and reused for the modify command.

Here's how it currently works: the album structures in the database need to have their fields updated when their constituent items change. So we update all the items in the DB, then check all of their associated albums to see whether they need to be implicitly updated to match.

In the modify command, you currently have to say beet modify -a albumartist=foo to change an album-level field. Otherwise (if you forget -a), your modifications to individual items in an album seem to be lost—templating, for example, prefers the album-level field.

So we should probably make album-level field modifications to items propagate to album structures. This would involve the same logic as the update command. In fact, the same logic is already used (via copy-n-paste, essentially) by the mbsync command. Let's put this all in one place where we can test and debug it and use it in all three places.

There's a chance that we should make this optional for the modify command. Are there exceptional circumstances where you really want to modify a track's album-level field in isolation and keep it out of sync with its album? Could happen if you like track-level genres, for instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.