Added error handling for --add-to-album
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
""" version info """
|
""" version info """
|
||||||
|
|
||||||
__version__ = "0.42.37"
|
__version__ = "0.42.38"
|
||||||
|
|||||||
@@ -29,7 +29,12 @@ class PhotosAlbum:
|
|||||||
)
|
)
|
||||||
|
|
||||||
def add_list(self, photo_list: List[PhotoInfo]):
|
def add_list(self, photo_list: List[PhotoInfo]):
|
||||||
photos = [photoscript.Photo(p.uuid) for p in photo_list]
|
photos = []
|
||||||
|
for p in photo_list:
|
||||||
|
try:
|
||||||
|
photos.append(photoscript.Photo(p.uuid))
|
||||||
|
except Exception as e:
|
||||||
|
self.verbose(f"Error creating Photo object for photo {p.uuid}: {e}")
|
||||||
for photolist in chunked(photos, 10):
|
for photolist in chunked(photos, 10):
|
||||||
self.album.add(photolist)
|
self.album.add(photolist)
|
||||||
photo_len = len(photos)
|
photo_len = len(photos)
|
||||||
|
|||||||
Reference in New Issue
Block a user