josephsurin / su-downloader2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sudPath

public util method to get .sud file

Kind: global constant

Param Type
filepath string

initiateDownload(options, [number])

Initiates a download, creating a new .sud file which has relevant metadata appended. Does not return anything.

Kind: global function

Param Type Default Description
options object
options.url string url to download
options.path string file save path (relative)
[number] 4 options.concurrent - number of concurrent downloads

createRequest(params)

creates request object and events

Kind: global function

Param Type Description
params object request params object

Request(params)

returns response and data streams

Kind: global function

Param Type Description
params object request params object

startDownload(sudFile)

starts/resumes downloading from the specified .sud file returns an observable that emits the progress of the download

Kind: global function

Param Type Description
sudFile string existing .sud file created with initiateDownload

startDownload~readMeta$

create file

Kind: inner constant of startDownload

suDownloader()

suDownloader

Kind: global function

setSettings(settings)

Kind: global function

Param Type Description
settings object set downloader settings (maxConcurrentDownloads, autoQueue)

QueueDownload(downloadOptions)

Kind: global function

Param Type Description
downloadOptions object adds a download to queue, will automatically start download when queue is free if autoQueue is on

startDownload(key)

Kind: global function

Param Type Description
key string starts a download

startDownload~readMeta$

create file

Kind: inner constant of startDownload

startQueue()

starts the queue

Kind: global function

stopQueue()

stops the queue

Kind: global function

pauseDownload(key)

Kind: global function

Param Type Description
key string pauses a download

resumeDownload(key)

Kind: global function

Param Type Description
key string resumes a paused download

clearDownload(key, [deleteFile])

Kind: global function

Param Type Default Description
key object
[deleteFile] boolean false whether to delete the file or just clear from queue/active

About


Languages

Language:JavaScript 100.0%