public async Task Execute() { byte[] imagebytes = await DownloadHelper.DownloadFileAsync(this.DownloadTask.AbsoluteUrl, Manager.CookieContainer); if (imagebytes != null) { this.AddDownload(imagebytes); } else { this.Manager.AddRetry(this.DownloadTask); } }
public async Task Execute() { byte[] FileBytes = await DownloadHelper.DownloadFileAsync(this.DownloadTask.AbsoluteUrl, Manager.CookieContainer); if (FileBytes != null && FileBytes.Length > 0) { this.AddDownload(FileBytes); } else { this.Manager.AddRetry(this.DownloadTask); } //this.Manager.SiteDb.Routes.EnsureExists(this.DownloadTask.RelativeUrl, ConstObjectType.File); }