Partial fix for issue #213

This commit is contained in:
Rhet Turnbull
2020-09-13 18:15:46 -07:00
parent eb00ffd737
commit 459d91d7b1
19 changed files with 51 additions and 193 deletions

View File

@@ -1423,7 +1423,7 @@ def export(
(export_as_hardlink, exiftool),
(any(place), no_place),
(deleted, deleted_only),
(skip_edited, skip_original_if_edited)
(skip_edited, skip_original_if_edited),
]
if any(all(bb) for bb in exclusive):
click.echo("Incompatible export options", err=True)

View File

@@ -1,3 +1,3 @@
""" version info """
__version__ = "0.34.1"
__version__ = "0.34.2"

View File

@@ -621,6 +621,9 @@ class PhotoTemplate:
""" return list of values for a multi-valued template field """
if field == "album":
values = self.photo.albums
values = [
value.replace("/", ":") for value in values
] # TODO: temp fix for issue #213
elif field == "keyword":
values = self.photo.keywords
elif field == "person":
@@ -638,11 +641,13 @@ class PhotoTemplate:
if album.folder_names:
# album in folder
folder = path_sep.join(album.folder_names)
folder += path_sep + album.title
folder += path_sep + album.title.replace(
"/", ":"
) # TODO: temp fix for issue #213
values.append(folder)
else:
# album not in folder
values.append(album.title)
values.append(album.title.replace("/", ":"))
else:
raise ValueError(f"Unhandleded template value: {field}")