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

Add ability to specify fields with beet write #3720

Open
baco opened this issue Aug 4, 2020 · 9 comments
Open

Add ability to specify fields with beet write #3720

baco opened this issue Aug 4, 2020 · 9 comments
Labels
feature features we would like to implement

Comments

@baco
Copy link

baco commented Aug 4, 2020

Use case

I'm trying to use beets to correct some tags on the music files

Solution

The library already contains the correct tags for the entire album, but I want only to reflect some of them on the music files, for instance the year of the track. Running beet write will write all tags in the library, not just the track's year. I'd like to have a --fields flag that allows me to specify which tags to write:

$ beet write "All the Things She Said" --fields year,artist_sort

On the other way around, suppose I have the correct field in the music file, but the release wasn't properly on MusicBrainz, and I like to have the correct value on my beets' database; I'd also like to have the flag --fields on the update command to specify which fields beets should overwrite on DB from file:

$ beet update "All the Things She Said" --fields year,artist_sort
@jtpavlock
Copy link
Contributor

So, I'll start by saying that beet update -F may do what you want for the update part (doc ref)

For the write part, I'm having a little trouble understanding the use for why you would only want to write a couple of tags to the files. Can you provide an extended example of what you'd like to achieve with this?

@jtpavlock jtpavlock added the needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature." label Aug 4, 2020
@baco
Copy link
Author

baco commented Aug 5, 2020

Ok, my bad about the update flag, I missed that option.

For the wirte part, sure! There are many many fields beets fetches from MusicBrainz when importing a release; among them:

albumartist_credit, albumartist_sort, albumdisambig, albumstatus, albumtype, arranger, artist_credit, artist_sort, asin, bitdepth, bitrate, bpm, catalognum, channels, comp, composer_sort, data_source, day, disctitle, encoder, format, grouping, id, initial_key, label, language, lyricist, lyrics, mb_albumartistid, mb_albumid, mb_artistid, mb_releasegroupid, mb_releasetrackid, mb_trackid, media, month, mtime, original_day, original_month, original_year, r128_album_gain, r128_track_gain, releasegroupdisambig, rg_album_gain, rg_album_peak, rg_track_gain, rg_track_peak, samplerate, script, track_alt

all of them, I really really don't want them, nor need them on the music file.

It's ok to have them on the library, but on the file I really don't want them around. Mplayer/Mpv (my main music player) list them all when loading the file and floods the terminal. So I really prefer to write a minimum of fields to the music file, say: artist, albumartist, title, track and nothing more. Again I'd like to keep them on the music library, but don't want them on the terminal.

@baco
Copy link
Author

baco commented Aug 5, 2020

Even more, this flag could come in company of a setting for write to specify the list of fields write writes by default if no --fields flag is used.

@jtpavlock jtpavlock changed the title Add --fields flag to write and update commands Add ability to specify fields with beet write Aug 5, 2020
@jtpavlock jtpavlock added feature features we would like to implement and removed needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature." labels Aug 5, 2020
@baco
Copy link
Author

baco commented Aug 7, 2020

To justify even more. Other uses for the functionality I find useful:

I have some music files with the comments' tag full. Running beet write overwrites that tag and I lose the comments. Choosing which tags to write, avoiding to list “comment” among those tags, could prevent beet write to overwrite/blank that field.

@sampsyo
Copy link
Member

sampsyo commented Aug 7, 2020

For this particular use case, @baco, you might try doing a beet update to load those comments into the beets database. That way, beets and your files will agree about the metadata and beet write won't clobber anything.

@3ThumbsUp
Copy link

I'd also find it useful to specify which tags Beets actually write to. It seems fairly obvious to me that a music tagger should have options for which tags to actually use.

There are some tags that I do some manual intervention on, and would like Beets to never write to unless forced.

Using 'beet update' is not ideal because I also sync my beets database with mbsync regularly. It gets complicated to sync your entire collection except a few tags with MusicBrainz. Ideally I would just sync beets with Mbsync, and then write to my files without worrying that Beets will tag something I don't want.

@JOJ0
Copy link
Member

JOJ0 commented Jan 29, 2023

That sure is a legitimate feature request that was discussed often already. For example this one. It's the other way round: Excluding fields, not including, but isn't that essentially the same?
#4087 (comment)

By any chance you are a developer and want to start implementing a draft version of it?

@andzno1
Copy link

andzno1 commented Mar 27, 2024

So, I'll start by saying that beet update -F may do what you want for the update part (doc ref)

For the write part, I'm having a little trouble understanding the use for why you would only want to write a couple of tags to the files. Can you provide an extended example of what you'd like to achieve with this?

I would really like to see the ability as well (exclude fields). In my case I need it as a work-around for #4715 so my write executions don't spam my terminal with hundreds of lines of albumtype changes that don't really do anything and show up on every write execution.

@cbrt-x
Copy link

cbrt-x commented Aug 28, 2024

This is something I desperately want to see in a musicbrainz tagger and since picard doesn't have this option either I would be more than happy to have this option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature features we would like to implement
Projects
None yet
Development

No branches or pull requests

7 participants