mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-14 22:04:15 +01:00
add some preliminary vfx work
This commit is contained in:
parent
4226f2e16d
commit
8459fe8f25
11 changed files with 217 additions and 26 deletions
|
|
@ -172,7 +172,7 @@ namespace MareSynchronos.WebAPI
|
|||
{
|
||||
CurrentUploads.Add(new UploadFileTransfer(file)
|
||||
{
|
||||
Total = new FileInfo(db.FileCaches.FirstOrDefault(f => f.Hash.ToLowerInvariant() == file.Hash.ToLowerInvariant())
|
||||
Total = new FileInfo(db.FileCaches.FirstOrDefault(f => f.Hash.ToLower() == file.Hash.ToLower())
|
||||
?.Filepath ?? string.Empty).Length
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,6 +128,10 @@ namespace MareSynchronos.WebAPI
|
|||
|
||||
public async Task CreateConnections()
|
||||
{
|
||||
Logger.Info("Recreating Connection");
|
||||
|
||||
await StopConnection(_connectionCancellationTokenSource.Token);
|
||||
|
||||
if (_pluginConfiguration.FullPause)
|
||||
{
|
||||
ServerState = ServerState.Disconnected;
|
||||
|
|
@ -135,10 +139,6 @@ namespace MareSynchronos.WebAPI
|
|||
return;
|
||||
}
|
||||
|
||||
Logger.Info("Recreating Connection");
|
||||
|
||||
await StopConnection(_connectionCancellationTokenSource.Token);
|
||||
|
||||
_connectionCancellationTokenSource.Cancel();
|
||||
_connectionCancellationTokenSource = new CancellationTokenSource();
|
||||
var token = _connectionCancellationTokenSource.Token;
|
||||
|
|
@ -329,6 +329,7 @@ namespace MareSynchronos.WebAPI
|
|||
{
|
||||
if (_mareHub is not null)
|
||||
{
|
||||
_uploadCancellationTokenSource?.Cancel();
|
||||
Logger.Info("Stopping existing connection");
|
||||
await _mareHub.StopAsync(token);
|
||||
_mareHub.Closed -= MareHubOnClosed;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue