mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
update ggemini api
This commit is contained in:
parent
159814b3c7
commit
0d202a866a
1 changed files with 10 additions and 8 deletions
|
|
@ -295,10 +295,11 @@ fn handle(
|
|||
connection.stream(),
|
||||
Priority::DEFAULT,
|
||||
cancellable.clone(),
|
||||
(
|
||||
0x400, // 1024 chunk
|
||||
0xfffff, // 1M limit
|
||||
),
|
||||
memory_input_stream::Size {
|
||||
chunk: 0x400, // 1024 bytes chunk
|
||||
limit: 0xfffff, // 1M limit
|
||||
total: 0, // initial totals
|
||||
},
|
||||
(
|
||||
|_, _| {}, // on chunk (maybe nothing to count yet @TODO)
|
||||
move |result| match result { // on complete
|
||||
|
|
@ -398,10 +399,11 @@ fn handle(
|
|||
connection.stream(),
|
||||
Priority::DEFAULT,
|
||||
cancellable.clone(),
|
||||
(
|
||||
0x400, // 1024 bytes per chunk, optional step for images download tracking
|
||||
0xA00000 // 10M bytes max to prevent memory overflow if server play with promises
|
||||
),
|
||||
memory_input_stream::Size {
|
||||
chunk: 0x400, // 1024 bytes chunk
|
||||
limit: 0xA00000, // 10M limit
|
||||
total: 0, // initial totals
|
||||
},
|
||||
(
|
||||
move |_, total| status.set_description(Some(&format!("Download: {total} bytes"))),
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue