Garmin: Add workaround for missing next page id on new sync protocol

This commit is contained in:
José Rebelo
2025-10-07 20:40:40 +01:00
parent eb37c343d1
commit 752ea8b992
2 changed files with 13 additions and 0 deletions
@@ -89,6 +89,15 @@ class FileSyncServiceHandler(val deviceSupport: GarminSupport) {
deviceSupport.addFileToDownloadList(file)
}
// #5461 - some watches to not send the next page ID
// however, from previous logs, it always seems to match the max seen across all sent items, so attempt
// to fallback to that as a workaround so we can fetch the subsequent files
if (fileListResponse.nextPageId == 0) {
nextPageId = fileListResponse.fileList
.mapNotNull { it.pageId }
.maxOrNull() ?: 0
}
return null
}
@@ -56,8 +56,10 @@ message FileListRequest {
message FileListResponse {
optional uint32 unk1 = 1; // 0
optional uint32 unk2 = 2; // 2 on venu 4
optional uint32 next_page_id = 3; // 33737, incrementiong
repeated File file = 4;
optional uint32 unk6 = 6; // 1 on venu 4
}
message File {
@@ -65,6 +67,8 @@ message File {
optional FileType type = 2;
optional uint32 size = 3;
optional uint32 page_id = 5; // 33652, 33653, ... incrementing
optional uint32 unk4 = 4; // 0 on venu 4
optional uint32 unk6 = 6; // 2 on venu 4
}
message FileId {