added list_photo_libraries

This commit is contained in:
Rhet Turnbull
2019-12-08 00:24:34 -08:00
parent 1d006a4b50
commit 62fedc7fbf
3 changed files with 12 additions and 1 deletions

View File

@@ -1,3 +1,4 @@
import glob
import json
import logging
import os.path
@@ -189,6 +190,12 @@ def get_last_library_path():
return None
def list_photo_libraries():
""" returns list of Photos libraries found in the user's Pictures folder """
lib_list = glob.glob(f"{str(Path.home())}/Pictures/*.photoslibrary")
return lib_list
class PhotosDB:
def __init__(self, dbfile=None):
""" create a new PhotosDB object """