Fix load path definition

This commit is contained in:
Cédric Leporcq 2021-08-08 12:43:17 +02:00
parent a88a62d155
commit bfada5e740
3 changed files with 3 additions and 7 deletions

View File

@ -49,9 +49,7 @@ def get_path_definition(config):
if 'format' in config['Path']:
return config['Path']['format']
elif 'dirs_path' and 'name' in config['Path']:
return path.join(config['Path']['dirs_path'],
config['Path']['name'])
return path.join(constants.default_path, constants.default_name)
return config['Path']['dirs_path'] + '/' + config['Path']['name']
return constants.default_path + '/' + constants.default_name

View File

@ -17,7 +17,7 @@ if (
application_directory = environ['ELODIE_APPLICATION_DIRECTORY']
default_path = '{%Y-%m-%b}/{album}|{city}|{"Unknown Location"}'
default_name = '{%Y-%m-%d_%H-%M-%S}-{original_name}-{title}.{ext}'
default_name = '{%Y-%m-%d_%H-%M-%S}-{name}-{title}.%l{ext}'
default_geocoder = 'Nominatim'
# Checksum storage file.
hash_db = 'hash.json'

View File

@ -270,8 +270,6 @@ class FileSystem(object):
:returns: string"""
# if self.path_format is None:
# path_format = self.get_path_definition()
path_format = self.path_format
path = []
path_parts = path_format.split('/')