Added ExifInfo (Photos 5 only)

This commit is contained in:
Rhet Turnbull
2020-05-13 22:42:33 -07:00
parent d1af14dbb4
commit 53304d7023
13 changed files with 606 additions and 298 deletions

View File

@@ -44,20 +44,27 @@ from ..utils import (
get_last_library_path,
)
# mixins
from .photosdb_mixin_searchinfo import PhotosDBMixinSearchInfo
# TODO: Add test for imageTimeZoneOffsetSeconds = None
# TODO: Fix command line so multiple --keyword, etc. are AND (instead of OR as they are in .photos())
# Or fix the help text to match behavior
# TODO: Add test for __str__
# TODO: Add special albums and magic albums
# TODO: fix "if X not in y" dictionary checks to use try/except EAFP style
class PhotosDB(PhotosDBMixinSearchInfo):
class PhotosDB:
""" Processes a Photos.app library database to extract information about photos """
# import additional methods
from ._photosdb_process_exif import _process_exifinfo
from ._photosdb_process_searchinfo import (
_process_searchinfo,
labels,
labels_normalized,
labels_as_dict,
labels_normalized_as_dict,
)
def __init__(self, *dbfile_, dbfile=None):
""" create a new PhotosDB object
path to photos library or database may be specified EITHER as first argument or as named argument dbfile=path
@@ -1848,6 +1855,9 @@ class PhotosDB(PhotosDBMixinSearchInfo):
# process search info
self._process_searchinfo()
# process exif info
self._process_exifinfo()
# done processing, dump debug data if requested
if _debug():
logging.debug("Faces (_dbfaces_uuid):")