From f493ca4b7f4238b9f7970bd906e43d2ca442e0b8 Mon Sep 17 00:00:00 2001 From: Rhet Turnbull Date: Tue, 31 Dec 2019 06:45:33 -0800 Subject: [PATCH] Fix to CLI info to correct number of photos/shared photos reported --- osxphotos/__main__.py | 6 ++++-- osxphotos/_version.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/osxphotos/__main__.py b/osxphotos/__main__.py index 19eb0fbe..aa5722e5 100644 --- a/osxphotos/__main__.py +++ b/osxphotos/__main__.py @@ -101,10 +101,12 @@ def info(cli_obj): info["database_version"] = pdb.db_version photos = pdb.photos() - info["photo_count"] = len(photos) + not_shared_photos = [p for p in photos if not p.shared] + info["photo_count"] = len(not_shared_photos) movies = pdb.photos(images=False, movies=True) - info["movie_count"] = len(movies) + not_shared_movies = [p for p in movies if not p.shared] + info["movie_count"] = len(not_shared_movies) if pdb.db_version >= _PHOTOS_5_VERSION: shared_photos = [p for p in photos if p.shared] diff --git a/osxphotos/_version.py b/osxphotos/_version.py index 0661408b..61a8b134 100644 --- a/osxphotos/_version.py +++ b/osxphotos/_version.py @@ -1,3 +1,3 @@ """ version info """ -__version__ = "0.19.02" +__version__ = "0.19.03"