fix imports and update to api11

This commit is contained in:
Stanley Dimant
2022-08-19 11:35:43 +02:00
parent 0499d837d6
commit 61d6458707
4 changed files with 4 additions and 6 deletions

View File

@@ -74,10 +74,7 @@ namespace MareSynchronos.WebAPI
Logger.Debug("Downloading files (Download ID " + currentDownloadId + ")");
List<DownloadFileDto> downloadFileInfoFromService = new List<DownloadFileDto>();
foreach (var file in fileReplacementDto)
{
downloadFileInfoFromService.Add(await _mareHub!.InvokeAsync<DownloadFileDto>(Api.InvokeFileGetFileSize, file.Hash, ct));
}
downloadFileInfoFromService.AddRange(await _mareHub!.InvokeAsync<List<DownloadFileDto>>(Api.InvokeGetFilesSizes, fileReplacementDto.Select(f => f.Hash).ToList(), ct));
CurrentDownloads[currentDownloadId] = downloadFileInfoFromService.Distinct().Select(d => new DownloadFileTransfer(d))
.Where(d => d.CanBeTransferred).ToList();