* morituri/common/common.py:

* morituri/common/program.py:
	* morituri/image/table.py:
	* morituri/rip/cd.py:
	* morituri/test/test_common_common.py:
	* morituri/test/test_image_toc.py:
	  Handle cases where disc_template and track_template are not in
	  the same directory.
This commit is contained in:
Thomas Vander Stichele
2012-11-22 23:20:44 +00:00
parent d0435dc2ab
commit 9b4e653ae4
7 changed files with 96 additions and 23 deletions

View File

@@ -503,15 +503,19 @@ class Table(object, log.Loggable):
discId1[-1], discId1[-2], discId1[-3],
self.getAudioTracks(), discId1, discId2, self.getCDDBDiscId())
def cue(self, program='Morituri'):
def cue(self, cuePath='', program='Morituri'):
"""
@param cuePath: path to the cue file to be written. If empty,
will treat paths as if in current directory.
Dump our internal representation to a .cue file content.
"""
lines = []
def writeFile(path):
lines.append('FILE "%s" WAVE' % os.path.basename(path))
targetPath = common.getRelativePath(path, cuePath)
lines.append('FILE "%s" WAVE' % targetPath)
# header
main = ['PERFORMER', 'TITLE']