* morituri/common/common.py:
Add shrinkPath to write shorter path names. * morituri/test/test_common_common.py (added): Add test. * morituri/program/cdparanoia.py: Catch ENAMETOOLONG and shrink path. * morituri/common/program.py: Update track result's filename if it was shrunk. * morituri/rip/cd.py: set the possibly shrunk path on the result.
This commit is contained in:
@@ -550,6 +550,9 @@ class Program(log.Loggable):
|
||||
def ripTrack(self, runner, trackResult, offset, device, profile, taglist,
|
||||
what=None):
|
||||
"""
|
||||
Ripping the track may change the track's filename as stored in
|
||||
trackResult.
|
||||
|
||||
@param trackResult: the object to store information in.
|
||||
@type trackResult: L{result.TrackResult}
|
||||
@param number: track number (1-based)
|
||||
@@ -583,6 +586,10 @@ class Program(log.Loggable):
|
||||
trackResult.peak = t.peak
|
||||
trackResult.quality = t.quality
|
||||
|
||||
if trackResult.filename != t.path:
|
||||
trackResult.filename = t.path
|
||||
self.info('Filename changed to %r', trackResult.filename)
|
||||
|
||||
def retagImage(self, runner, taglists):
|
||||
cueImage = image.Image(self.cuePath)
|
||||
t = image.ImageRetagTask(cueImage, taglists)
|
||||
|
||||
Reference in New Issue
Block a user