@smbcloud / smbcloud-ascapi Mirror · read-only / commits / 889c042
Fork 0

Read-only mirror of github.com/smbcloudXYZ/smbcloud-ascapi.

Mirrored from https://github.com/smbcloudXYZ/smbcloud-ascapi.git

Synced Nov 25, 09:15 UTC

Hold AppGallery screenshots to the console's 3 to 8

The API reference allows up to 10 screenshot addresses, but the AGC console rejects a listing with fewer than 3 or more than 8. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Seto Elkahfi committed Oct 27, 2026 at 16:30 UTC 889c042da586419047baa0207dfc7d4ded623030
1 file changed +9 -5
crates/frontend/src/appgallery.rs
+9 -5
@@ -203,8 +203,10 @@ pub async fn update_basic_info(
203 })
204 }
205
206 -/// Most screenshots AppGallery takes per language.
207 -pub const MAX_SCREENSHOTS: usize = 10;
206 +/// Screenshots per language: the AGC console asks for 3 to 8 (the API
207 +/// reference allows up to 10 addresses, but the console rejects the listing).
208 +pub const MIN_SCREENSHOTS: usize = 3;
209 +pub const MAX_SCREENSHOTS: usize = 8;
210
211 #[derive(Debug, Serialize)]
212 pub struct PlannedFile {
@@ -643,9 +645,11 @@ mod tests {
645 assert!(check_files(FileType::PromoVideo, &p(&["v.mp4", "poster.png"])).is_ok());
646 assert!(check_files(FileType::IntroVideo, &p(&["v.mp4"])).is_err());
647 assert!(check_files(FileType::ElectronicCertificate, &p(&["c.pdf"])).is_ok());
646 - let eleven: Vec<String> = (0..11).map(|i| format!("{i}.png")).collect();
647 - let eleven: Vec<&str> = eleven.iter().map(String::as_str).collect();
648 - assert!(check_files(FileType::Screenshots, &p(&eleven)).is_err());
648 + let nine: Vec<String> = (0..9).map(|i| format!("{i}.png")).collect();
649 + let nine: Vec<&str> = nine.iter().map(String::as_str).collect();
650 + assert!(check_files(FileType::Screenshots, &p(&nine)).is_err());
651 + assert!(check_files(FileType::Screenshots, &p(&["1.png", "2.png"])).is_err());
652 + assert!(check_files(FileType::Screenshots, &p(&["1.png", "2.png", "3.png"])).is_ok());
653 }
654
655 #[test]