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

Enable whipper to use track title #430

Merged
merged 2 commits into from
Dec 13, 2019
Merged

Conversation

ABCbum
Copy link
Contributor

@ABCbum ABCbum commented Dec 12, 2019

Submitted as a part of GCI competition

The solution i came up with for #192 is that: track.title = t.get('title', t['recording']['title']).

Explaination
Since if a track itself doesn't have a title then the track title is the same with the recording title. Otherwise, a track has its own title then t['title'] is different from t['recording']['title'] and whipper chooses t['title'].

Note: I also added a test case for this using an existing release JSON file.

@ABCbum ABCbum force-pushed the develop branch 2 times, most recently from db5d0f0 to 63a3b59 Compare December 12, 2019 06:39
@MerlijnWajer
Copy link
Collaborator

Thank you. I will review this soon.

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.

The code looks good, clean, simple to me. I like how you’ve included your reasoning for the change in your PR description – if I was to ask you to change anything, it would be to include this same level of detailed reasoning into your actual commit message(s). :)

See e.g., https://web.archive.org/web/20170115082335/http://ablogaboutcode.com/2011/03/23/proper-git-commit-messages-and-an-elegant-git-history/ and https://chris.beams.io/posts/git-commit/ for pointers on writing better commit messages.

@ABCbum
Copy link
Contributor Author

ABCbum commented Dec 13, 2019

Hi @Freso, thanks for your review it encourages me a lot and yes i can make the commit messages more detailed now. :D

Copy link
Collaborator

@JoeLametta JoeLametta left a comment

Choose a reason for hiding this comment

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

Looks good!
I've just added minor suggestions as comments.

ABCbum added 2 commits December 13, 2019 17:39
track.title = t.get('title', t['recording']['title']).

Since if a track itself doesn't have a title then the track
title is the same with the recording title. Otherwise, a track
has its own title then t['title'] is different from
t['recording']['title'] and whipper chooses t['title'].

[Fixes whipper-team#192]
Signed-off-by: ABCbum <kimlong221002@gmail.com>
Using an existing JSON release file

Signed-off-by: ABCbum <kimlong221002@gmail.com>
@MerlijnWajer
Copy link
Collaborator

Looks good to me!

@JoeLametta JoeLametta merged commit 31d589b into whipper-team:develop Dec 13, 2019
@JoeLametta
Copy link
Collaborator

Merged, thanks!

hydrian pushed a commit to hydrian/whipper that referenced this pull request Dec 18, 2019
* Enable whipper to use track title if possible

track.title = t.get('title', t['recording']['title']).

Since if a track itself doesn't have a title then the track
title is the same with the recording title. Otherwise, a track
has its own title then t['title'] is different from
t['recording']['title'] and whipper chooses t['title'].

[Fixes whipper-team#192]
Signed-off-by: ABCbum <kimlong221002@gmail.com>

* Add test case to check for track title

Using an existing JSON release file

Signed-off-by: ABCbum <kimlong221002@gmail.com>
Signed-off-by: hydrian <ben.tyger@tygerclan.net>
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