mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Garmin: Add workaround for missing next page id on new sync protocol
This commit is contained in:
+9
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user