Fixed rare issue where the download link would be empty or invalid.

This commit is contained in:
Roger Far 2021-06-09 17:39:30 -06:00
parent 94804d7cba
commit fa9c839be0

View file

@ -237,8 +237,16 @@ namespace RdtClient.Service.Services
continue;
}
var downloadLink = await _torrents.UnrestrictLink(download.DownloadId);
download.Link = downloadLink;
try
{
var downloadLink = await _torrents.UnrestrictLink(download.DownloadId);
download.Link = downloadLink;
}
catch (Exception ex)
{
await _downloads.UpdateError(download.DownloadId, ex.Message);
continue;
}
download.DownloadStarted = DateTime.UtcNow;
await _downloads.UpdateDownloadStarted(download.DownloadId, download.DownloadStarted);