Let relocate photo accept the old filepath in place of photo id.
This commit is contained in:
parent
b64901105c
commit
ba99b43bc7
1 changed files with 7 additions and 1 deletions
|
@ -497,6 +497,9 @@ def relocate_argparse(args):
|
|||
load_photodb()
|
||||
|
||||
with photodb.transaction:
|
||||
if '.' in args.photo_id:
|
||||
photo = photodb.get_photo_by_path(args.photo_id)
|
||||
else:
|
||||
photo = photodb.get_photo(args.photo_id)
|
||||
photo.relocate(args.filepath)
|
||||
|
||||
|
@ -1310,6 +1313,9 @@ def main(argv):
|
|||
)
|
||||
p_relocate.add_argument(
|
||||
'filepath',
|
||||
help='''
|
||||
The new filepath of the photo.
|
||||
''',
|
||||
)
|
||||
p_relocate.add_argument(
|
||||
'--yes',
|
||||
|
|
Loading…
Reference in a new issue