I'm using Tanaike-san's project here: https://github.com/tanaikech/GPhotoApp to add mediaItems to my shared album. I've updated the _apiCall code to specify a position:
path: "mediaItems:batchCreate",
payload: {
albumId: opts.albumId,
newMediaItems: newMediaItems,
albumPosition: { <--- I added this
position: "FIRST_IN_ALBUM" <--- I added this
} <--- I added this
}
});
Using the following references: https://developers.google.com/photos/library/reference/rest/v1/mediaItems/batchCreate https://developers.google.com/photos/library/reference/rest/v1/AlbumPosition
..and that appeared to work perfectly for ~ 250 photos & videos.
Then, for some reason the mediaItems started appearing at the "bottom" of the album (LAST_IN_ALBUM).
I'm at a loss to explain why the uploads suddenly started appearing at the opposite end of the album, nor can I seem to fix it.
I tried changing "FIRST_IN_ALBUM" to "LAST_IN_ALBUM" and the new uploads continue to appear at the bottom ...making it look like there was no change.
Are albums actually made up of multiple groups of mediaItems? If so, then perhaps the new mediaItems are being added to the "FIRST" in that new group-list, and it happens to appear at the bottom of the existing album list-set???
I appreciate any insight into what's going on and ideas for how I can resolve this issue.
My goal is to just upload mediaItems and have them added to the "front" or "top" of my album, since I'm stepping through the items in date-order.