-
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
Enable whipper to use track title #430
Conversation
db5d0f0
to
63a3b59
Compare
Thank you. I will review this soon. |
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.
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.
Hi @Freso, thanks for your review it encourages me a lot and yes i can make the commit messages more detailed now. :D |
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.
Looks good!
I've just added minor suggestions as comments.
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>
Looks good to me! |
Merged, thanks! |
* 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>
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 fromt['recording']['title']
and whipper choosest['title']
.Note: I also added a test case for this using an existing release JSON file.