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

Make getFastToc() fast again #417

Merged
merged 2 commits into from
Oct 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions whipper/command/cd.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,17 +443,17 @@ def _ripIfNotRipped(number):
logger.debug('HTOA peak %r is equal to the SILENT '
'threshold, disregarding', trackResult.peak)
self.itable.setFile(1, 0, None,
self.ittoc.getTrackStart(1), number)
self.itable.getTrackStart(1), number)
logger.debug('unlinking %r', trackResult.filename)
os.unlink(trackResult.filename)
trackResult.filename = None
logger.info('HTOA discarded, contains digital silence')
else:
self.itable.setFile(1, 0, trackResult.filename,
self.ittoc.getTrackStart(1), number)
self.itable.getTrackStart(1), number)
else:
self.itable.setFile(number, 1, trackResult.filename,
self.ittoc.getTrackLength(number), number)
self.itable.getTrackLength(number), number)

self.program.saveRipResult()

Expand Down Expand Up @@ -482,7 +482,7 @@ def _ripIfNotRipped(number):
self.program.write_m3u(discName)

try:
self.program.verifyImage(self.runner, self.ittoc)
self.program.verifyImage(self.runner, self.itable)
except accurip.EntryNotFound:
logger.warning('AccurateRip entry not found')

Expand Down
2 changes: 1 addition & 1 deletion whipper/common/program.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def getFastToc(self, runner, device):
logger.warning('cdrdao older than 1.2.3 has a pre-gap length bug.'
' See http://sourceforge.net/tracker/?func=detail&aid=604751&group_id=2171&atid=102171') # noqa: E501

t = cdrdao.ReadTOCTask(device)
t = cdrdao.ReadTOCTask(device, fast_toc=True)
runner.run(t)
toc = t.toc.table

Expand Down