Preserve ToC file generated by cdrdao

Whipper uses cdrdao during its ripping process. With this commit it will now store cdrdao's generated tocfile in the ripping path.
Preserving the tocfile allows users to easily burn ripped discs having a non-compliant cue sheet.

Fixes #214.
This commit is contained in:
JoeLametta
2018-10-26 08:00:00 +00:00
parent 2b286be91c
commit c2af4459ef
3 changed files with 27 additions and 10 deletions

View File

@@ -104,7 +104,8 @@ class Program:
assert toc.hasTOC()
return toc
def getTable(self, runner, cddbdiscid, mbdiscid, device, offset):
def getTable(self, runner, cddbdiscid, mbdiscid, device, offset,
out_path):
"""
Retrieve the Table either from the cache or the drive.
@@ -126,7 +127,7 @@ class Program:
logger.debug('getTable: cddbdiscid %s, mbdiscid %s not '
'in cache for offset %s, reading table' % (
cddbdiscid, mbdiscid, offset))
t = cdrdao.ReadTableTask(device)
t = cdrdao.ReadTableTask(device, out_path)
itable = t.table
tdict[offset] = itable
ptable.persist(tdict)