Make rip cd info not eject. Fixes #35.
This commit is contained in:
@@ -43,8 +43,11 @@ class _CD(logcommand.LogCommand):
|
||||
|
||||
"""
|
||||
@type program: L{program.Program}
|
||||
@ivar eject: whether to eject the drive after completing
|
||||
"""
|
||||
|
||||
eject = True
|
||||
|
||||
def addOptions(self):
|
||||
# FIXME: have a cache of these pickles somewhere
|
||||
self.parser.add_option('-T', '--toc-pickle',
|
||||
@@ -94,7 +97,7 @@ class _CD(logcommand.LogCommand):
|
||||
self.stdout.write('FreeDB identifies disc as %s\n' % cddbmd)
|
||||
|
||||
# also used by rip cd info
|
||||
if not getattr(self.options, 'unknown', False):
|
||||
if not getattr(self.options, 'unknown', False) and self.eject:
|
||||
self.program.ejectDevice(self.device)
|
||||
return -1
|
||||
|
||||
@@ -150,7 +153,8 @@ class _CD(logcommand.LogCommand):
|
||||
|
||||
self.doCommand()
|
||||
|
||||
self.program.ejectDevice(self.device)
|
||||
if self.eject:
|
||||
self.program.ejectDevice(self.device)
|
||||
|
||||
def doCommand(self):
|
||||
pass
|
||||
@@ -159,6 +163,8 @@ class _CD(logcommand.LogCommand):
|
||||
class Info(_CD):
|
||||
summary = "retrieve information about the currently inserted CD"
|
||||
|
||||
eject = False
|
||||
|
||||
|
||||
class Rip(_CD):
|
||||
summary = "rip CD"
|
||||
|
||||
Reference in New Issue
Block a user