From 19778a6d84216d92d4da38b7fd518276b450ca54 Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 6 Jun 2012 13:27:48 +0200 Subject: [PATCH] change pattern for finding leftover files --- oxtimelines/timeline.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/oxtimelines/timeline.py b/oxtimelines/timeline.py index 0bc98de..7cfe1b6 100644 --- a/oxtimelines/timeline.py +++ b/oxtimelines/timeline.py @@ -57,7 +57,7 @@ class Video(gst.Pipeline): self.rate = gst.element_factory_make('videorate') self.csp = gst.element_factory_make('ffmpegcolorspace') self.vsink = ImageSink(self._video_callback) - # self.vsink.connect('frame', self._video_callback) + #self.vsink.connect('frame', self._video_callback) self.add( self.vqueue, self.scale, self.rate, self.csp, self.vsink ) @@ -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)