Added more info to debug-dump --dump photos (#1124)
This commit is contained in:
parent
45468dd1a9
commit
34fda8bcbc
@ -93,13 +93,25 @@ def debug_dump(
|
|||||||
pprint.pprint(photosdb._dbpersons_fullname)
|
pprint.pprint(photosdb._dbpersons_fullname)
|
||||||
elif attr == "photos":
|
elif attr == "photos":
|
||||||
photos = photosdb.query(options=query_options)
|
photos = photosdb.query(options=query_options)
|
||||||
uuid = [photo.uuid for photo in photos]
|
for p in photos:
|
||||||
for uuid_ in uuid:
|
# print info on each photo
|
||||||
print(f"_dbphotos['{uuid_}']:")
|
# catch any errors and continue (because if we're using debug-dump, it might be because of an error)
|
||||||
|
print(f"photo: {p.uuid}")
|
||||||
|
print(f"_dbphotos['{p.uuid}']:")
|
||||||
try:
|
try:
|
||||||
pprint.pprint(photosdb._dbphotos[uuid_])
|
print(photosdb._dbphotos[p.uuid])
|
||||||
except KeyError:
|
except KeyError:
|
||||||
print(f"Did not find uuid {uuid_} in _dbphotos")
|
print(f"Did not find uuid {p.uuid} in _dbphotos")
|
||||||
|
print("PhotoInfo:")
|
||||||
|
try:
|
||||||
|
print(p.asdict(shallow=False))
|
||||||
|
except Exception as e:
|
||||||
|
print(f"Error dumping PhotoInfo.asdict(): {e}")
|
||||||
|
print("ZASSET")
|
||||||
|
print(p.tables().ZASSET.rows_dict())
|
||||||
|
print("ZADDITIONALASSETATTRIBUTES")
|
||||||
|
print(p.tables().ZADDITIONALASSETATTRIBUTES.rows_dict())
|
||||||
|
print("-" * 40)
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
val = getattr(photosdb, attr)
|
val = getattr(photosdb, attr)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user