Fix load path definition
This commit is contained in:
		
							parent
							
								
									a88a62d155
								
							
						
					
					
						commit
						bfada5e740
					
				@ -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
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -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'
 | 
			
		||||
 | 
			
		||||
@ -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('/')
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user