change pattern for finding leftover files
This commit is contained in:
parent
c688e95a6b
commit
19778a6d84
1 changed files with 4 additions and 4 deletions
|
@ -321,15 +321,15 @@ class Timelines():
|
||||||
self.frame_offset = 0
|
self.frame_offset = 0
|
||||||
self.videos[0].decode(self.file_points[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:
|
if not self.points:
|
||||||
for mode in self.modes:
|
for mode in self.modes:
|
||||||
type = 'png' if mode == 'data' else 'jpg'
|
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:]:
|
for f in ox.sorted_strings(tiles)[self.large_tile_i+2:]:
|
||||||
os.unlink(f)
|
os.unlink(f)
|
||||||
if self.render_small_tiles:
|
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:]:
|
for f in ox.sorted_strings(tiles)[self.small_tile_i+2:]:
|
||||||
os.unlink(f)
|
os.unlink(f)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue