Files
whipper-gui/examples/readtoc.py
Thomas Vander Stichele 9841d5e2fb handle not having a toc
2009-05-04 13:48:22 +00:00

22 lines
416 B
Python

# -*- Mode: Python -*-
# vi:si:et:sw=4:sts=4:ts=4
from morituri.common import task, log
from morituri.program import cdrdao
def main():
log.init()
runner = task.SyncRunner()
t = cdrdao.ReadTOCTask()
runner.run(t)
print 'runner done', t.toc
if not t.table:
print 'Failed to read TOC'
return
for track in t.table.tracks:
print track.getIndex(1).absolute
main()