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

Submodule MareAPI updated: 21fe024dfb...374cc31bab

View File

@@ -3,7 +3,7 @@
<PropertyGroup>
<Authors></Authors>
<Company></Company>
<Version>0.3.4</Version>
<Version>0.3.5</Version>
<Description></Description>
<Copyright></Copyright>
<PackageProjectUrl>https://github.com/Penumbra-Sync/client</PackageProjectUrl>

View File

@@ -13,6 +13,7 @@ using MareSynchronos.WebAPI;
using Dalamud.Interface.Windowing;
using MareSynchronos.UI;
using MareSynchronos.Utils;
using System.Runtime.InteropServices;
namespace MareSynchronos
{

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();