Update for 6.3 and change to File Service Queue (#34)

* add request queue processing on clientside, switch to net7

* reuse httpclient

* dispose and renew httpclient on building connection

* add handling of QueueRequestDto to downloads

* group download by host and port

* refactor SendAsync to SendRequestAsync for readability

* add holding ctrl before clearing cache, add tooltip

* update pathing

* fixes to api usage in client

* fix rendermodel offsets

* fixes for downloads

Co-authored-by: rootdarkarchon <root.darkarchon@outlook.com>
This commit is contained in:
rootdarkarchon
2023-01-11 14:41:13 +01:00
committed by GitHub
parent 964b29b87e
commit 099ac2b3a1
7 changed files with 130 additions and 38 deletions

View File

@@ -669,16 +669,22 @@ public class SettingsUi : Window, IDisposable
ImGui.SameLine();
if (ImGui.Button("Clear local cache"))
{
Task.Run(() =>
if (UiShared.CtrlPressed())
{
foreach (var file in Directory.GetFiles(_configuration.CacheFolder))
Task.Run(() =>
{
File.Delete(file);
}
foreach (var file in Directory.GetFiles(_configuration.CacheFolder))
{
File.Delete(file);
}
_uiShared.RecalculateFileCacheSize();
});
_uiShared.RecalculateFileCacheSize();
});
}
}
UiShared.AttachToolTip("You normally do not need to do this. This will solely remove all downloaded data from all players and will require you to re-download everything again." + Environment.NewLine
+ "Mares Cache is self-clearing and will not surpass the limit you have set it to." + Environment.NewLine
+ "If you still think you need to do this hold CTRL while pressing the button.");
}
public override void OnClose()