From 4c0036611e12e55a1639b96d404441a19072a94f Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Sun, 22 May 2011 17:12:21 +0000 Subject: [PATCH] patch by: Ross Burton * 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. --- ChangeLog | 9 +++++++++ morituri/image/table.py | 7 ++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 16682f8..09f7428 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2011-05-22 Thomas Vander Stichele + + patch by: Ross Burton + + * 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 * morituri/rip/main.py: diff --git a/morituri/image/table.py b/morituri/image/table.py index 81e14f8..b95e6d3 100644 --- a/morituri/image/table.py +++ b/morituri/image/table.py @@ -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)))