feat: add getPercentComplete
/ getCurrentBytesPerSecond
/ getEndTime
to DownloadItem (#42913)
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:
parent
8ed34bf203
commit
d3596f61b6
4 changed files with 46 additions and 1 deletions
|
@ -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`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue