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

Genre is not written to files on update through beets. #3013

Closed
dkanada opened this issue Aug 24, 2018 · 18 comments
Closed

Genre is not written to files on update through beets. #3013

dkanada opened this issue Aug 24, 2018 · 18 comments
Labels
needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature."

Comments

@dkanada
Copy link

dkanada commented Aug 24, 2018

Problem

If I manually edit the genre of an album through beet edit -a it does not get applied to the files. If I edit a genre, delete the database, and rebuild the genre is blank again. I have a bunch of blank genres in my library and I think it might have been this, no clue though.

Running this command in verbose mode:
https://pastebin.com/9Xf8tXtz

Led to this problem:
Any time I try to edit the genre of an album it doesn't write to the files.

Setup

os: arch linux
python version: 3.7.0
beets version: 1.4.7
plugins enabled: edit fetchart zero convert

My configuration is:
https://pastebin.com/envv2kPR

@sampsyo
Copy link
Member

sampsyo commented Aug 24, 2018

Hi! We’ll need more detail to understand what’s going on. Can you check the files with the info plugin to check whether anything changed, for example?

@sampsyo sampsyo added the needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature." label Aug 24, 2018
@dkanada
Copy link
Author

dkanada commented Aug 24, 2018

beet info 'title:ROIDO'
https://pastebin.com/Hf3zJxzc

beet ls -a 'album:BIRTHDAY'
https://pastebin.com/9DjWQ0iq

@sampsyo
Copy link
Member

sampsyo commented Aug 24, 2018

You’ll want to use the -a flag to edit as well to change album-level fields.

@dkanada
Copy link
Author

dkanada commented Aug 24, 2018

Yes, that is what I was doing. I am a bit unclear on the album level fields, if I edit the genre tag with beet edit -a $QUERY will that not write the genre to the individual files?

@sampsyo
Copy link
Member

sampsyo commented Aug 24, 2018

Aha! Sorry; I misread info above as edit.

Editing at the album level should indeed "trickle down" to individual files' tags. The other way, however, generally doesn't happen.

I don't have a good answer for why that's happening! It doesn't happen here. Again, lots more detail would be useful—including, but definitely definitely not limited to:

  • Does it happen for other fields?
  • What if you edit again right after saving changes?
  • What about track-level fields (i.e., without using -a)?

@dkanada
Copy link
Author

dkanada commented Aug 24, 2018

Tested two of the three scenarios. Running beet edit -a 'album:Birthday' and changing the album does change the field for beet edit -a and beet info on a song, but running beet edit -a 'album:Birthday' and changing the genre does change the field for beet edit -a but doesn't change the field for beet info on a song.

@dkanada
Copy link
Author

dkanada commented Aug 24, 2018

Just to be sure, on beet info for a song the "genres" tag is the one I am looking for, correct? I am guessing it is just plural for delimited lists in the "genre" tag.

@sampsyo
Copy link
Member

sampsyo commented Aug 24, 2018

Yes! That's a somewhat transitional tag that we're using as part of a (stalled?) effort to fully support multiple genres.

That's interesting that the genre field in particular is having trouble! Does editing it on the track itself (i.e., without using -a) work?

@dkanada
Copy link
Author

dkanada commented Aug 24, 2018

I just tested that too, doesn't work on the track itself either. I also just confirmed that the album tag was indeed written to the file after refreshing the database again, so this issue is only for the genre tag as far as I can tell.

@sampsyo
Copy link
Member

sampsyo commented Aug 24, 2018

Hmm... in that case, can you try disabling the zero plugin?

@dkanada
Copy link
Author

dkanada commented Aug 25, 2018

Confirmed fix disabling the zero plugin. However, I list the genre tag in my fields to keep so this could be a bug in the plugin.

@sampsyo
Copy link
Member

sampsyo commented Aug 25, 2018

Sounds like you're almost there! It would be useful to fiddle with the plugin's configuration. For example, maybe try using the "negative" approach instead of the "positive" one. Or try adding genres to the list in addition to genre.

@dkanada
Copy link
Author

dkanada commented Aug 26, 2018

Replacing genre with genres worked. This turned out to be user error, but I am not sure using the label genres to write to the genre tag is very discoverable. My first thought would be to list the exact spelling of the tag I am trying to modify.

@sampsyo
Copy link
Member

sampsyo commented Aug 26, 2018

OK! Yeah, this is a pretty unfortunate consequence of the transitional "genres" tag, which we probably introduced prematurely before the full infrastructure for multi-valued tags was in place. See also #2503 and #505. The "right thing to do" would be to let genre and genres both work, probably—but this will require a deeper change than just a tweak to the zero plugin.

@sampsyo sampsyo closed this as completed Aug 26, 2018
@dkanada
Copy link
Author

dkanada commented Sep 7, 2018

This probably has to be reopened, I am pretty sure the inconsistency between genre and genres is wiping the tag on certain commands. I have the zero plugin keeping both tags and yet somehow the genre is still getting wiped. Might be from the edit command but I am not really sure.

@dkanada
Copy link
Author

dkanada commented Sep 7, 2018

Side note, this is somewhat frustrating for a stable release using a config that had worked previously with absolutely no indication that the genre tag would be wiped throughout a third of my music collection. I just recently spent a lot of time fixing the tags and now I will have to go back through yet again to fix them.

@sampsyo
Copy link
Member

sampsyo commented Sep 7, 2018

Can you please open a new ticket with a complete description of what you're observing?

I understand that it must be frustrating! With complete specifics and a plan of action, we might have a shot at fixing the problem.

@dkanada
Copy link
Author

dkanada commented Sep 8, 2018

I am not sure what to think anymore, I moved a couple albums over to a new machine and set up beets with the same config, but I can't replicate the problem. It made no sense, so I figured it must have been user error, but I checked my zsh history and didn't see any commands that would have caused another genre wipe. I don't want to make a new issue without having more information, so let me know if you have an idea of the best way to debug this. Maybe it is something with my beets database not getting updated properly and rewriting the old blank tags again? I have been wiping the database after noticing the issue to try and avoid it, then reimporting all my music.

The reason I think it is still an issue is because I had the genres fixed and looking good in another program. Then I imported some new music and some of the same albums were wiped again. I manually edited the genres again to fix them and everything was fine. After messing with a specific artist, running a couple of commands and such, only her albums were missing the genre tag. Manually edited them and everything is showing up now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature."
Projects
None yet
Development

No branches or pull requests

2 participants