* morituri/image/table.py:

Add getPregap() method.
	* morituri/rip/cd.py:
	  Use artist.name, not getUniqueName, to avoid monstruous names for
	  Muse.
	  Pass mbdiscid to getPath, so Unknown Disc can be saved with it.
	  Don't set the date if the release doesn't have one.
	  Set pregap on trackResult using new Track.getPregap()
	  Write all log/cue/m3u files as utf-8.
This commit is contained in:
Thomas Vander Stichele
2009-06-07 12:54:32 +00:00
parent 3c57682a5a
commit 8f88db0a29
3 changed files with 56 additions and 26 deletions

View File

@@ -95,6 +95,17 @@ class Track:
indexes.sort()
return self.indexes[indexes[-1]]
def getPregap(self):
"""
Returns the length of the pregap for this track.
The pregap is 0 if there is no index 0, and the difference between
index 1 and index 0 if there is.
"""
if 0 not in self.indexes:
return 0
return self.indexes[1].absolute - self.indexes[0].absolute
class Index:
"""