- for path in self.paths:
- for dirpath, dirs, filenames in os.walk(path):
- debug('Scanning "%s" for images' % dirpath)
- if self.directories.has_key(dirpath):
- continue
- filenames = list(filter_images(filenames))
- if len(filenames):
- self.directories[dirpath] = filenames
- debug('Adding "%s" to "%s"' % (filenames, dirpath))
- else:
- debug("No images found in '%s'" % dirpath)
-
+ pass
+
+ def add_path(self, path):
+ logging.debug('Added path "%s" to the list' % path)
+ for dirpath, dirs, filenames in os.walk(path):
+ logging.debug('Scanning "%s" for images' % dirpath)
+ if self.directories.has_key(dirpath):
+ continue
+ filenames = list(filter_images(filenames))
+ if len(filenames):
+ self.directories[dirpath] = filenames
+ logging.debug('Adding "%s" to "%s"' % (filenames, dirpath))
+ else:
+ logging.debug("No images found in '%s'" % dirpath)
+