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(),
|
connection.stream(),
|
||||||
Priority::DEFAULT,
|
Priority::DEFAULT,
|
||||||
cancellable.clone(),
|
cancellable.clone(),
|
||||||
(
|
memory_input_stream::Size {
|
||||||
0x400, // 1024 chunk
|
chunk: 0x400, // 1024 bytes chunk
|
||||||
0xfffff, // 1M limit
|
limit: 0xfffff, // 1M limit
|
||||||
),
|
total: 0, // initial totals
|
||||||
|
},
|
||||||
(
|
(
|
||||||
|_, _| {}, // on chunk (maybe nothing to count yet @TODO)
|
|_, _| {}, // on chunk (maybe nothing to count yet @TODO)
|
||||||
move |result| match result { // on complete
|
move |result| match result { // on complete
|
||||||
|
|
@ -398,10 +399,11 @@ fn handle(
|
||||||
connection.stream(),
|
connection.stream(),
|
||||||
Priority::DEFAULT,
|
Priority::DEFAULT,
|
||||||
cancellable.clone(),
|
cancellable.clone(),
|
||||||
(
|
memory_input_stream::Size {
|
||||||
0x400, // 1024 bytes per chunk, optional step for images download tracking
|
chunk: 0x400, // 1024 bytes chunk
|
||||||
0xA00000 // 10M bytes max to prevent memory overflow if server play with promises
|
limit: 0xA00000, // 10M limit
|
||||||
),
|
total: 0, // initial totals
|
||||||
|
},
|
||||||
(
|
(
|
||||||
move |_, total| status.set_description(Some(&format!("Download: {total} bytes"))),
|
move |_, total| status.set_description(Some(&format!("Download: {total} bytes"))),
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue