The intention of the hide_stacked_assets
parameter was to exclude all images within a stack except for the image at the front of each stack, so that the list of images that a user sees in Lightroom (and their order) match what is downloaded in the action.
It looks like I was mistaken about how that parameter works in the underlying API, however:
- Setting it to true hides every item in the stack, including the front asset
- That parameter doesn't seem to even work in the unauthenticated version of the API
But it looks like stacks and their contents are still available in that API, by adding stack
to the subtype
querystring parameter.
Within the stack assets, the cover.id
seems to refer to the asset ID of the first image in the stack. And the stack assets themselves have a sort field that seems to be reflected in the returned asset order.
{
"id": "2adc3595bc694263b5acc89ad...",
"type": "album_asset",
"asset": {
"id": "3eb54d9f08524b95af610c4233...",
"type": "asset",
"subtype": "stack",
"payload": {
"userUpdated": "2023-04-28T20:59:17.965Z",
"cover": {
"id": "c00bbaa6f9c34824b359d2c2b..."
},
}
},
},
Unfortunately, the underlying assets are also present, and other than the cover asset, there isn't anything that distinguishes "hidden" assets from non-stacked assets. This could be handled with hide_stacked_assets
, but without returning that data, we don't have access to the metadata we need for the cover image.
For now, this could be handled by making two requests, one with subtype=image,stack
and hide_stacked_assets=true
, and the second with subtype=image
and hide_stacked_assets=false
.