示例#1
0
	def get_photo_meta_files(self, query, db_helper):
		meta_root = db_helper.get_meta_root(query)
		meta_dirs = [o for o in os.listdir(meta_root) if os.path.isdir(meta_root + '/' + o)]
		files = []
		for meta_dir in meta_dirs:
			tmp_files = getFileOfType(meta_root + '/' + meta_dir, 'txt')
			for tmp_file in tmp_files:
				tmp_file = meta_root + '/' + meta_dir + '/' + tmp_file
				files.append(tmp_file)
		return files
示例#2
0
	def get_photo_with_tag(self, metaFilePath):
		photoBuilder = PhotoBuilder();

		files = getFileOfType(metaFilePath,'txt')
		for i in range(0, len(files)):
			files[i] = metaFilePath + '/' + files[i]

		photos = []
		for filepath in files:
			items = photoBuilder.get_photo_from_file(filepath)
			photos.extend(items)
		return photos