You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If user queries a specific album name, photos should be sortable to match the sort order of the album. Currently the only way to get sort order is to get the list of photos in an album (AlbumInfo.photos) and find where in the list the UUID for the given photo is.
PhotoInfo._dbalbums_album contains the desired info:
key is album UUID, value is list of tuples of (photo UUID, sort order) contained in that album
e.g. {'0C514A98-7B77-4E4F-801B-364B7B65EAFA': [('1EB2B765-0765-43BA-A90C-0D0580E6172C', 1024)]}
The sort order is a number but only meaningful in a relative sense, it does not indicate absolute placement in the album.
Timewarp feature #1784 will need this too in order to increment time in the correct order. For photos selected in Timewarp, photos should be sorted first by album name then by sort order within the album.
Could solve this by adding a new property, PhotoInfo.album_sort which returns a list of of tuples of album name (full path) and sort order and these could be used as keys in the sort.
e.g.
[('AlbumA', 1), ('Folder1/AlbumB', 4)]
Then have --sort-key be smart enough to accept a tuple of keys for sorting:
Adding a sort key (or allowing multiple sort keys) would allow osxphotos to easily do what this app does.
--sort-key "photo.size" --sort-key "photo.score_info.overall"
How to sort by album sort order?
The text was updated successfully, but these errors were encountered: