Fixed bug in CLI export_photo -- live photo not exported if verbose wasn't set

This commit is contained in:
Rhet Turnbull
2020-01-05 18:36:58 -08:00
parent f484737940
commit 0dac64409b
3 changed files with 10 additions and 2 deletions

View File

@@ -991,7 +991,9 @@ def export_photo(
if verbose:
click.echo(f"Exporting live photo video of {filename} as {live_name}")
_copy_file(src_live, str(dest_live))
_copy_file(src_live, str(dest_live))
return photo_path

View File

@@ -1,3 +1,3 @@
""" version info """
__version__ = "0.21.1"
__version__ = "0.21.2"

View File

@@ -1130,6 +1130,10 @@ class PhotosDB:
# Get info on remote/local availability for photos in shared albums
# Shared photos have a null fingerprint (and some other photos do too)
# TODO: There may be a bug here, perhaps ZDATASTORESUBTYPE should be 1 --> it's the longest ZDATALENGTH (is this the original)
# Also, doesn't seem to be entirely accurate for PNGs (screenshots mostly)
# for PNGs, JPEG render seems to be used unless edited or exported
# see for example ./resources/renders/F/F2FF9B89-FB6F-4853-942B-9F8BEE8DFFA1_1_201_a.jpeg
c.execute(
""" SELECT
ZGENERICASSET.ZUUID,
@@ -1139,6 +1143,8 @@ class PhotosDB:
JOIN ZADDITIONALASSETATTRIBUTES ON ZADDITIONALASSETATTRIBUTES.ZASSET = ZGENERICASSET.Z_PK
JOIN ZINTERNALRESOURCE ON ZINTERNALRESOURCE.ZASSET = ZADDITIONALASSETATTRIBUTES.ZASSET
WHERE ZDATASTORESUBTYPE = 0 OR ZDATASTORESUBTYPE = 3 """
# WHERE ZDATASTORESUBTYPE = 1 OR ZDATASTORESUBTYPE = 3 """
# WHERE ZDATASTORESUBTYPE = 0 OR ZDATASTORESUBTYPE = 3 """
# WHERE ZINTERNALRESOURCE.ZFINGERPRINT IS NULL AND ZINTERNALRESOURCE.ZDATASTORESUBTYPE = 3 """
)