public void Retry(string id) { if (this.paused) { return; } lock (this.changeDownloadLockObject) { DownloadTask downloadTask; if (!this.downloadTasks.TryGetValue(id, out downloadTask)) { TwitchVideoDownload download = this.Downloads.Where(d => d.Video.Id == id).FirstOrDefault(); if (download != null && (download.DownloadStatus == DownloadStatus.Canceled || download.DownloadStatus == DownloadStatus.Error)) { download.ResetLog(); download.Progress = 0; download.DownloadStatus = DownloadStatus.Queued; download.Status = "Initializing"; } } } }
public void Retry(string id) { if (_paused) { return; } lock (_changeDownloadLockObject) { if (!_downloadTasks.TryGetValue(id, out DownloadTask downloadTask)) { TwitchVideoDownload download = _downloads.Where(d => d.Id == id).FirstOrDefault(); if (download != null && (download.DownloadState == DownloadState.Canceled || download.DownloadState == DownloadState.Error)) { download.ResetLog(); download.SetProgress(0); download.SetDownloadState(DownloadState.Queued); download.SetStatus("Initializing"); } } } }