A single album in a Photos library. Albums can contain photos and, in the case of folders, can contain other albums as subalbums.
Properties
| Property |
Type |
Access |
Description |
| name |
text |
r/w |
The name of the album. |
| uuid |
text |
r/o |
The unique identifier of the album. |
| album type |
album type enum |
r/o |
The type of the album (e.g. regular album, smart album, folder). |
| parent |
album |
r/o |
The parent album (folder) that contains this album, if any. |
Elements
| Element |
Description |
| photo |
The photos contained in this album. |
| album |
Subalbums contained in this album (applicable to folders). |
Responds To
| Command |
Description |
| export |
Exports the photos in this album. |
Example
tell application "PowerPhotos"
set lib to first library
set allAlbums to every album of lib
repeat with anAlbum in allAlbums
set albumType to album type of anAlbum
if albumType is regular album then
set albumName to name of anAlbum
set photoCount to count of photos of anAlbum
log "Album: " & albumName & " — Photos: " & photoCount
end if
end repeat
end tell