change pattern for finding leftover files

This commit is contained in:
rolux 2012-06-06 13:27:48 +02:00
parent c688e95a6b
commit 19778a6d84

View file

@ -321,15 +321,15 @@ class Timelines():
self.frame_offset = 0
self.videos[0].decode(self.file_points[0])
#remove tiles that might exist from previous run
# remove tiles from previous run
if not self.points:
for mode in self.modes:
type = 'png' if mode == 'data' else 'jpg'
tiles = glob('%s/timeline%s*%d*.%s' % (self.tile_path, mode, self.large_tile_h, type))
tiles = glob('%s/timeline%s%dp*.%s' % (self.tile_path, mode, self.large_tile_h, type))
for f in ox.sorted_strings(tiles)[self.large_tile_i+2:]:
os.unlink(f)
if self.render_small_tiles:
tiles = glob('%s/timeline%s*%d*.%s' % (self.tile_path, mode, self.small_tile_h, type))
tiles = glob('%s/timeline%s%dp*.%s' % (self.tile_path, mode, self.small_tile_h, type))
for f in ox.sorted_strings(tiles)[self.small_tile_i+2:]:
os.unlink(f)