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

Fix artist name #156

Merged
merged 8 commits into from
Sep 14, 2017
Merged

Fix artist name #156

merged 8 commits into from
Sep 14, 2017

Conversation

gorgobacka
Copy link
Contributor

@gorgobacka gorgobacka commented May 1, 2017

At the moment, whipper always uses 'Artist in MusicBrainz' for track artist and album artist. This can lead for example to '[unknown]' in filenames.

This PR fix this issue (also mentioned here: #155) and uses the artist-credit -> name if it exists (and therefor the name is different from 'Artist name in MusicBrainz'), and otherwise artist-credit -> artist -> name.

@Freso
Copy link
Member

Freso commented May 31, 2017

It would be great with a test case to both show case the issue and also document that your fix is working.

@gorgobacka
Copy link
Contributor Author

@Freso Thanks a lot for your comment. I will try to include a test case over the weekend.

Use artist-credit->name, if it exists. Otherwise use artist-credit->artist->name.
@gorgobacka
Copy link
Contributor Author

gorgobacka commented Jun 4, 2017

I rebased the code unto latest master and added a test case to demonstrate that the metadata is set correctly for both situations. However, the test does not check the filenames.

@Freso Do you think a test to check the filenames is also needed? I expect it's not, since the variable artist (instead of sort-name) is used for the filenames.

Copy link
Member

@Freso Freso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would probably remove some of the blank lines in testNorthernGateway() myself to keep "parts" closer together (e.g., definition of track2 and checking of track2's properties), but nothing that should block this going in.

I do think the function comment should be a proper function comment, that is a docstring, though. :)


def testNorthernGateway(self):
# disc with artists tagged with [unknown] and an alias in MusicBrainz
# see https://github.com/JoeLametta/whipper/issues/155
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this a docstring instead of a comment. :)

Copy link
Contributor Author

@gorgobacka gorgobacka Jun 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your suggestion. I will change it soon.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking forward to merge it when it's completed.

@gorgobacka gorgobacka changed the title Fix artist name WIP: Fix artist name Jun 9, 2017
@gorgobacka
Copy link
Contributor Author

gorgobacka commented Jun 19, 2017

@JoeLametta Thanks for reminding. I wanted to include the following, therefore it was on hold.

I expect my previous changing needs some explanation. During my recent tests, I detected that sometimes the artist name in the recoding is different from the artist name on the release. I thought this also fits to this PR and added a fix for it. Before, whipper used always the artist name of the recording. However, this is not always correct. Now it uses the artist name of the release first.

@Freso Can you give some insights about the artists named in recordings, please? Do you think, they are handled correctly now? What about track titles? I expect they can be also different (this might be a separate PR).

Edit: Sorry.. I messed around with my commits... :-/

@gorgobacka gorgobacka changed the title WIP: Fix artist name Fix artist name Jun 19, 2017
@JoeLametta
Copy link
Collaborator

Let's hear what @Freso thinks about it: my knowledge regarding to MusicBrainz's inner details is quite limited.

@Freso
Copy link
Member

Freso commented Jul 14, 2017

A Track title can be different than a Recording title (and IMHO, whipper should use the Track titles).

In the same vein, I feel whipper should use the Track artist credit and disregard the Recording artist credit entirely. (Though possibly as a switch for classical - in MusicBrainz, classical releases have the composer as the Track artist and the performers as the Recording artist(s).)

@JoeLametta
Copy link
Collaborator

@gorgobacka Hi, Freso replied. What's your status update about this pull request?

@gorgobacka
Copy link
Contributor Author

gorgobacka commented Aug 16, 2017

@JoeLametta It can be merged. The Track Title can be addressed in a different PR. Same for a switch for classical releases.

Note: At the moment I'm still using the Recording artist as fallback, if no Track artist is present in the json.

@RecursiveForest
Copy link
Contributor

RecursiveForest commented Sep 6, 2017

This looks good to me, although I can't say I know much about the semantics of MusicBrainz entries. I'm happy to have this merged to fix issue 155 and to address using track title & using a classical switch in another PR. If I don't hear a NAK from @JoeLametta, @Freso, or @MerlijnWajer in the next few days I'll press the button.

In particular, thanks for including tests in your PR.

@gorgobacka
Copy link
Contributor Author

@RecursiveForest, @JoeLametta If there is nothing missing, can you please merge this PR?

@JoeLametta JoeLametta merged commit 7ae27de into whipper-team:master Sep 14, 2017
@JoeLametta
Copy link
Collaborator

If there is nothing missing, can you please merge this PR?

Merged, thanks.

@gorgobacka
Copy link
Contributor Author

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants