diff --git a/elodie.py b/elodie.py index d5f03e0..3092d8e 100755 --- a/elodie.py +++ b/elodie.py @@ -143,7 +143,6 @@ def _import(destination, source, file, album_from_folder, trash, allow_duplicate if has_errors: sys.exit(1) - @click.command('generate-db') @click.option('--source', type=click.Path(file_okay=False), required=True, help='Source of your photo library.') @@ -331,7 +330,7 @@ def _update(album, location, time, title, paths, debug): original_base_name.replace('-%s' % original_title, '')) dest_path = FILESYSTEM.process_file(current_file, destination, - updated_media, move=True, allowDuplicate=True) + updated_media, False, move=True, allowDuplicate=True) log.info(u'%s -> %s' % (current_file, dest_path)) log.all('{"source":"%s", "destination":"%s"}' % (current_file, dest_path)) diff --git a/elodie/filesystem.py b/elodie/filesystem.py index d1dfcd2..26a076c 100644 --- a/elodie/filesystem.py +++ b/elodie/filesystem.py @@ -518,6 +518,8 @@ class FileSystem(object): place_name, ) return parsed_folder_name + elif part in ('folder'): + return os.path.basename(metadata['directory_path']) elif part in ('album', 'camera_make', 'camera_model'): if metadata[part]: return metadata[part]