feat: add getPercentComplete / getCurrentBytesPerSecond / getEndTime to DownloadItem (#42915)

feat: getCurrentSpeed / getPercentComplete / getEndTime on DownloadItem

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Theo Gravity <theo@suteki.nu>
This commit is contained in:
trop[bot] 2024-07-17 09:49:05 -07:00 committed by GitHub
parent e429b6f745
commit 1de0bb30b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 46 additions and 1 deletions

View file

@ -145,6 +145,10 @@ Returns `string` - The file name of the download item.
disk. If user changes the file name in a prompted download saving dialog, the
actual name of saved file will be different.
#### `downloadItem.getCurrentBytesPerSecond()`
Returns `Integer` - The current download speed in bytes per second.
#### `downloadItem.getTotalBytes()`
Returns `Integer` - The total size in bytes of the download item.
@ -155,6 +159,10 @@ If the size is unknown, it returns 0.
Returns `Integer` - The received bytes of the download item.
#### `downloadItem.getPercentComplete()`
Returns `Integer` - The download completion in percent.
#### `downloadItem.getContentDisposition()`
Returns `string` - The Content-Disposition field from the response
@ -184,6 +192,10 @@ Returns `string` - ETag header value.
Returns `Double` - Number of seconds since the UNIX epoch when the download was
started.
#### `downloadItem.getEndTime()`
Returns `Double` - Number of seconds since the UNIX epoch when the download ended.
### Instance Properties
#### `downloadItem.savePath`