patch by: Ross Burton <ross@burtonini.com>

* morituri/image/table.py:
	  When writing the .cue file, only write the basename, since
	  the .cue file gets stored in the album directory.
	  Fixes #10.
This commit is contained in:
Thomas Vander Stichele
2011-05-22 17:12:21 +00:00
parent 10eb2ee176
commit 4c0036611e
2 changed files with 13 additions and 3 deletions

View File

@@ -1,3 +1,12 @@
2011-05-22 Thomas Vander Stichele <thomas at apestaart dot org>
patch by: Ross Burton <ross@burtonini.com>
* morituri/image/table.py:
When writing the .cue file, only write the basename, since
the .cue file gets stored in the album directory.
Fixes #10.
2011-05-22 Thomas Vander Stichele <thomas at apestaart dot org>
* morituri/rip/main.py:

View File

@@ -25,6 +25,7 @@ Wrap Table of Contents.
"""
import copy
import os
import urllib
import urlparse
@@ -548,7 +549,7 @@ class Table(object, log.Loggable):
# add the first FILE line
path = self.tracks[0].getFirstIndex().path
counter = self.tracks[0].getFirstIndex().counter
lines.append('FILE "%s" WAVE' % path)
lines.append('FILE "%s" WAVE' % os.path.basename(path))
for i, track in enumerate(self.tracks):
# FIXME: skip data tracks for now
@@ -560,7 +561,7 @@ class Table(object, log.Loggable):
if not track.indexes.has_key(0):
index = track.indexes[1]
if index.counter != counter:
lines.append('FILE "%s" WAVE' % index.path)
lines.append('FILE "%s" WAVE' % os.path.basename(index.path))
counter = index.counter
lines.append(" TRACK %02d %s" % (i + 1, 'AUDIO'))
for key in CDTEXT_FIELDS:
@@ -576,7 +577,7 @@ class Table(object, log.Loggable):
for number in indexes:
index = track.indexes[number]
if index.counter != counter:
lines.append('FILE "%s" WAVE' % index.path)
lines.append('FILE "%s" WAVE' % os.path.basename(index.path))
counter = index.counter
lines.append(" INDEX %02d %s" % (number,
common.framesToMSF(index.relative)))