-
Notifications
You must be signed in to change notification settings - Fork 90
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
Detect and handle CD-R discs #154
Conversation
Yep, apart from that it LGTM. 😉 |
Thanks for your comment. I prepared an update. |
@JoeLametta I would like to know, what do you think about the my update. And I'm wondering, if there are any additional improvements needed before it can be merged. |
I tested it yesterday and the feature seems to be working correctly. Here are the changes I'd like to be implemented before merging:
Thanks, |
Thanks for your fast reply and the constructive comments. I will provide an update over the weekend. |
whipper/command/cd.py
Outdated
@@ -143,6 +143,13 @@ def do(self): | |||
"--unknown not passed") | |||
return -1 | |||
|
|||
self.program.result.isCdr = cdrdao.DetectCdr(self.device) | |||
if self.program.result.isCdr and \ |
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 think it's better if you break it like this:
if (self.program.result.isCdr and
not getattr(self.options, 'cdr', False)):
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.
Everything else is OK
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.
Indeed it looks better. Updated.
Merged, thanks. 😉 |
This PR uses cdrdao to detect CD-R discs as discussed in #137 and stops the ripping process with a warning message. The parameter '--cdr' is required to rip this discs (similar to the '--unknown' parameter), indicating that the user should be sure that the inserted medium is reliable.
Additionally, the disc format is added to the output of 'Matching releases' to give the user more information.
Possible enhancements: add this information also to the logger.