-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Create arranger_sort, lyricist_sort, performer and performer_sort tags #2563
Conversation
@dosoe, thanks for your PR! By analyzing the history of the files in this pull request, we identified @sampsyo, @geigerzaehler and @brunal to be potential reviewers. |
Forgot a comma
As arranger_sort and lyricist_sort can't be read from the file due to no tag mapping, it is useless (and wrong) to try to read them.
Looking good so far! Please try running the tests, though—looks like they're complaining about a missing field on TrackInfo. https://travis-ci.org/beetbox/beets/jobs/232782949 |
It's strange the test is only complaining about lyricist_sort, since I did exactly the same with lyricist_sort than with arranger_sort. |
Hi! So I don't get what's wrong and I don't see where the problem is according to the logs. I could try out some stuff, but is there a way I can run the tests before uploading and committing? |
Yeah, absolutely! There's background on the testing setup and instructions for running them on the wiki: https://github.com/beetbox/beets/wiki/Testing Weird that the test failure is coming from the edit plugin. Maybe it would be worth running the |
Well, there is one in test.test_mediafile.py and in test._common.py, but adding it there still makes the tests fail. |
reimporting files and making 'beet -vv edit --all' doesn't raise any problems, and the lyricist_sort is fine (in the recording I tested there is no arranger). However, the tests still fail. I cannot really see why because 'python setup.py test' is overly verbose. |
Could all the problems be related to the ReadWriteTestBase class in test.test_mediafile.py ? |
OK! I'll investigate further, but FWIW, you can get compact test output for a specific test file by running |
This came out of an attempt to address the mysterious testing problems from PR #2563 and turned into a big old debacle. As it turns out, the problem came from calling Item.from_path and getting None for fields that weren't filled out by the MediaFile data. Everywhere else, we fill out these fixed attributes with the special null value for the field's type, so it's actually pretty confusing that these could mysteriously become None. I think it will be saner all around if we enforce this universally. There were two possible fixes: one in __getitem__ to check for missing values and one that set all the missing values in the constructor. I opted for the former because it has a smaller footprint, but the latter might have slightly better performance (depending on the ratio of constructions to lookups).
OK! I've addressed the test problem in #2605, so it should be possible for this PR to move forward. It looks like everything's mostly in place, except for a changelog entry? |
Keep my fork up to date
Great! Thank you very much. |
Ok, I synched up my fork with the main repo in the hope that your fix would clear the problems, but it seems like the tests are still failing. Apparently, there is a list of tags that I missed to update. |
Ah, cool—I think the problem is just that there are no tag definitions for MediaFile, but you've added the tags to the list of fields to be tested in |
Ok I tried to work through it, it seems like the |
It's all very confusing to me. Sometimes this code gets the performer just fine, sometimes it doesn't get anything. |
I finally sorted it out. When I hit |
Hi @sampsyo , as I said a few posts earlier, I can add a bootload of tags from MusicBrainz like album performers, recording date (actually an intervall), recording place, DJ and so on. The question is now if I should do this. What do you want from beets? Do you just want it to have the necessary information to sort your music or do you want it to contain all kind of relevant information about your music, becoming some kind of offline-musicbrainz? I can add as many tags as I can from MB without problem but maybe at some point there will be too many tags (DJ, DJ_sort, Mixer, Mixer_sort, Producer, Producer_sort, Engineer, Engineer_sort, Recording_place, Recording_date, Album_performer, Album_performer_sort, Recording_area and all the respective mb_ids...) and make beets less efficient and usable because of the flood of tags (it shouldn't make it slower however because it doesn't use any more API requests), on the other hand if maybe some day other programs use the beets database (as I would imagine to be possible on linux at least) this could be interesting. |
Actually it would be great if amarok and clementine were able to read the beets databases. |
I actually don't mind the idea of being "omnivorous" with the metadata that we fetch from MB. It doesn't really cost us anything to store extra flexible fields, as long as we don't endeavor to invent on-disk storage formats (e.g., ID3 tags) for every new field. A couple of contingencies come to mind:
|
Concerning the consistent structure, I would just take the one from MusicBrainz, since they had time, competence and interest to deal with it, but it's not too hard changing it. |
I am not a programmer, so I don't fully understand what is in #1547 . Would it just be to make a dictionary out of |
Personally, i'd rather have too much information in my beets database than not enough. I mean beets is the music tagger for OCD people, right? It might as well live up to it's name. |
Also my opinion. But redesigning the storing of the metadata would be interesting as well. By the way, @sampsyo is there a reason my 2 pull requests are still pending else than "too much to do IRL" (i. e. is there something wrong with them)? |
a little merge to keep my fork up to date |
Sorry for taking so long, and no, there's nothing wrong on your end! It is indeed IRL intrusions on my end; I'll get to this very soon, I hope. |
What is the status of this PR? Will fixing the merge conflict suffice to get this merged or are the more problems? |
I'd find the |
Yup, I hope that beets will support that field, too. If the merge conflics are the only thing blocking this I'd volunteer to fix them. |
@dosoe ping |
Hi! There was a discussion on #1547 that basically concluded that we first need to change the way |
Yes, that's the way to proceed! I don't think it should be too hard. I believe there may be a stalled effort like that around somewhere but I couldn't find it easily---maybe it doesn't actually exist. I would start with the simple, single-tag approach. I think the per-instrument tags are likely to be a pretty specialized use case. And I don't really see how to proceed with a "meta-tag" approach. The "start simple" approach also applies to album performers. Let's start with just tracks and reassess after that. |
IMHO the best way would be to check what Picard does and do the same instead of reinventing the wheel. This seems to be pretty well supported by audio players. When I look at the info of a track tagged with Picard in |
So to get this straight, this PR won't be merged until a proper implementation of the ideas proposed in #1547 exists? |
The relevant bits there have actually been addressed, in #3568, I think! It is now possible to easily add new fields that we extract from MB without fiddling with the |
Well, I stopped working on this PR, as with the flexible attributes another approach is better in my opinion. I'm trying to do it in #3589 |
Sounds good. I'll close this in favor of #3589 then |
In the same idea than #2529 , but since those tags are not in the MB-Picard tag mapping, I didn't do anything to write the tags to the files.
Else everything is pretty much copy-paste from #2529 . It's all following the philosophy that where there is an artist name, there should be his sort name.
I have an issue with the 'arranger' tag: in MusicBrainz there are two arranger tags: one that applies to recordings, and one that applies to works. So far we a only fetching the one that is about recordings, but especially for classical music the work-arranger is more used. The question is: should we make two separate tags, one work-arranger and a recording-arranger?
I also have an issue about the 'lyricist' tag: in classical music and especially in opera, the usual term is 'librettist' and MB has a separate tag for that. Should we keep them separate as well or just merge the two terms?