Refactored PhotosDB and CLI to require explicity passing the database to avoid non-deterministic behavior when last database can't be found. This may break existing code.

This commit is contained in:
Rhet Turnbull
2020-01-17 16:32:10 -08:00
parent ba1a2b32ad
commit ede56ffc31
6 changed files with 409 additions and 166 deletions

View File

@@ -8,7 +8,8 @@ import osxphotos
def main():
photosdb = osxphotos.PhotosDB()
db = os.path.expanduser("~/Pictures/Photos Library.photoslibrary")
photosdb = osxphotos.PhotosDB(db)
photos = photosdb.photos()
export_path = os.path.expanduser("~/Desktop/export")