Tutorial: Work with download manager

Work with download manager

Create a new download from a provided link:

stbDownloadManager.AddJob(url1, pathToSave1);

Create another download with operation status check:

if ( !stbDownloadManager.AddJob(url2, pathToSave2) ) {
    console.log('Was not able to create a job!');

Get all downloads general information and save jobs ids:

var queue  = JSON.parse(stbDownloadManager.GetQueueInfo()),
    job1Id = queue[0].id,
    job2Id = queue[1].id;

Stop file downloading:


Resume file downloading:


Change priority for given downloads:

// increase priority
stbDownloadManager.AdjustJobPriority(job1Id, true);
// decrease priority
stbDownloadManager.AdjustJobPriority(job2Id, false);

Remove a download from queue:


Insert another USB flash drive and restore all downloads using local catalog on selected device: