-
Notifications
You must be signed in to change notification settings - Fork 92
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 PERFORMER & COMPOSER metadata tags to audio tracks (if available) #444
Add PERFORMER & COMPOSER metadata tags to audio tracks (if available) #444
Conversation
4ce4224
to
370dc18
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like the underlying logic here needs to be improved. The code itself seems fine at a glance, but some of the presumptions seem shaky… :)
7ca2478
to
9b448c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking better, but still some hairy bits. I’d really recommend you try and actually edit a classical release to see it from the data entry side. :)
Also, looking at #191 now, it actually asks:
What you’re doing here is just adding more tags (which, IMHO, is perfectly fine), not actually changing what’s being tagged normally. I’m writing a question on that issue to ask for clarification of what it actually is they would like to see. |
62ec496
to
593bd8e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides the actual code comments, I think a couple of things need to happen:
- This needs to be unlinked from Alternative tagging for classical releases #191 as what is being done in this PR is not really what that issue asks for. I don’t think you should abandon this PR, but this PR will not solve Alternative tagging for classical releases #191, and at this point I don’t think it should aim to. It’s doing something else, and in the interest of keeping separate changes separate, Alternative tagging for classical releases #191 should be solved in a separate PR.
- Actually, I think 1) is it. :)
I don’t think you should abandon your GCI task. I still think your work here is GCI task worthy, it just doesn’t resolve #191.
Edit: And actually, based on this, I’d say the whole logic part with --classical
can probably be taken out.
whipper/common/mbngs.py
Outdated
return res | ||
|
||
|
||
def _getPerformers(artist_relation_list): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like the logic of this function makes whipper start being too bloated and going too much into tagger territory. People are vastly different in how they want they PERFORMER
tags (e.g., look up some of the discussions on the MeB forums regarding this). And even then, I reckon there are one or two additional edge cases I could probably think of.
If we want this in whipper, I’d say it should be extremely simple. Maybe just get the performers and don’t capture anything about what it is they perform?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JoeLametta and @MerlijnWajer input here would be appreciated though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As written elsewhere: I fully trust Freso's judgement about this. 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MerlijnWajer What do you think?
0b3d63b
to
b201e86
Compare
I've skimmed the code of this pull request but my knowledge about how metadata is structured in MusicBrainz is quite poor so I need to read on tomorrow (sorry). BTW: What's the purpose of these checks (aren't these expressions always if len(composers) > 0:
...
if len(performers) > 0:
... |
I reckon those checks are for cases when no work, no composer or no performer found then whipper will not add new tag just similar to the existing MUSICBRAINZ_WORKID check. Edit: Don't worry we all are busy :D . |
They’re not. E.g., https://musicbrainz.org/recording/69f6f250-e26f-4ce5-95a1-12129671ed7a will not have any |
I mean, @MerlijnWajer is the mentor for the task. My take would be that you complete the PR for adding |
But in the source code of if len(track.composers) == 0:
track.composers = track.artist
if len(track.performers) == 0:
track.performers = [track.recordingArtist]
composers = track.composers
performers = track.performers Given that, to me it seems both expressions ( |
Ah, I missed that. I think I meant for that code to be taken out, since that should be behind a Also, that code sets |
I'm going to rely on Freso here, I don't know enough about classical metadata. |
f8f6121
to
a4497bc
Compare
The tests failed because the order of |
ad05fc3
to
7e233bb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m generally happy with the code at this point. The metadata handling seems to be solid. Only one question about the amount of handling we want to be doing in whipper remains. I’ll leave it to @JoeLametta and/or @MerlijnWajer whether to merge or not from here on out.
551d5d3
to
1f68491
Compare
1f68491
to
c7aac7d
Compare
I think this pull request is now ready to be merged! 🎆 |
0a040b4
to
f5e4b5d
Compare
Add PERFORMER & COMPOSER metadata tags to audio tracks (if available). Composer(s) and performer(s) will be extracted from MusicBrainz recording metadata by new _getComposers and _getPerformers functions then there will be new properties added to each track metadata. If those data are present it will be tagged as new tags PERFORMER and COMPOSER. Signed-off-by: ABCbum <kimlong221002@gmail.com> Co-authored-by: JoeLametta <JoeLametta@users.noreply.github.com> Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
Signed-off-by: ABCbum <kimlong221002@gmail.com> Co-authored-by: JoeLametta <JoeLametta@users.noreply.github.com> Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
f5e4b5d
to
b79236e
Compare
@Freso Shall we merge this? |
Merged, thanks! |
Submitted as a part of GCI competition
Description
Composer(s) and performer(s) will be extracted from MusicBrainz recording metadata by new
_getComposers
and_getPerformers
functions then there will be new properties added to each track metadata. If those data are present it will be tagged as new tagsPERFORMER
andCOMPOSER
.