added list_photo_libraries
This commit is contained in:
@@ -139,6 +139,10 @@ if __name__ == "__main__":
|
||||
|
||||
Returns path to last opened Photo Library as string.
|
||||
|
||||
#### ```list_photo_libraries()```
|
||||
|
||||
Returns list of Photos libraries found in the user's Pictures folder.
|
||||
|
||||
### PhotosDB
|
||||
|
||||
#### Open the default Photos library
|
||||
|
||||
@@ -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 """
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
""" version info """
|
||||
|
||||
__version__ = "0.14.18"
|
||||
__version__ = "0.14.19"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user