Add %folder tag
This commit is contained in:
parent
f181c618b3
commit
0363fd4302
|
@ -143,7 +143,6 @@ def _import(destination, source, file, album_from_folder, trash, allow_duplicate
|
||||||
if has_errors:
|
if has_errors:
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
@click.command('generate-db')
|
@click.command('generate-db')
|
||||||
@click.option('--source', type=click.Path(file_okay=False),
|
@click.option('--source', type=click.Path(file_okay=False),
|
||||||
required=True, help='Source of your photo library.')
|
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, ''))
|
original_base_name.replace('-%s' % original_title, ''))
|
||||||
|
|
||||||
dest_path = FILESYSTEM.process_file(current_file, destination,
|
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.info(u'%s -> %s' % (current_file, dest_path))
|
||||||
log.all('{"source":"%s", "destination":"%s"}' % (current_file,
|
log.all('{"source":"%s", "destination":"%s"}' % (current_file,
|
||||||
dest_path))
|
dest_path))
|
||||||
|
|
|
@ -518,6 +518,8 @@ class FileSystem(object):
|
||||||
place_name,
|
place_name,
|
||||||
)
|
)
|
||||||
return parsed_folder_name
|
return parsed_folder_name
|
||||||
|
elif part in ('folder'):
|
||||||
|
return os.path.basename(metadata['directory_path'])
|
||||||
elif part in ('album', 'camera_make', 'camera_model'):
|
elif part in ('album', 'camera_make', 'camera_model'):
|
||||||
if metadata[part]:
|
if metadata[part]:
|
||||||
return metadata[part]
|
return metadata[part]
|
||||||
|
|
Loading…
Reference in New Issue