Clip counts on listings, so clients find photos with only clips
Derived clips (#208) aren't counted as versions, so a photo whose only derived file is a clip looked like a plain photo, and clients never fetched /image/versions for it. Summaries now carry clip_count: /photos adds the parallel array photo_clip_counts, records (memories, search, /photos/exif) carry clip_count. All skipped when zero, so other responses are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
19cbc9d59c
commit
3d1db90e3c
7 files changed
+84
-25
No files matched your search
@@ -125,6 +125,11 @@ pub struct PhotosResponse {
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
pub photo_version_counts: Vec<u32>,
|
||||
|
||||
/// How many derived clips (videos made from the photo, e.g. Animate)
|
||||
/// stand behind `photos[i]`; skipped when the page has none.
|
||||
#[serde(default, skip_serializing_if = "Vec::is_empty")]
|
||||
pub photo_clip_counts: Vec<u32>,
|
||||
|
||||
// Pagination metadata (only present when limit is set)
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub total_count: Option<i64>,
|
||||
|
||||
Reference in new issue
Block a user