Compare commits

...

10 Commits

Author SHA1 Message Date
defnotken
f76ded344b Testing decompression stuff
All checks were successful
Tag and Release Lightless / tag-and-release (push) Successful in 2m5s
2025-12-30 08:54:49 -06:00
defnotken
e4b4e90640 Merge branch 'decompression-bullshit' into dev 2025-12-30 08:54:17 -06:00
defnotken
3308a475d7 Merge branch '2.0.2' into dev 2025-12-30 08:54:02 -06:00
defnotken
c32c89d1a8 Complete Decompression after try. 2025-12-30 08:52:59 -06:00
a8b58d05d6 Merge pull request 'pair-adapter-debug' (#121) from pair-adapter-debug into 2.0.2
Reviewed-on: #121
2025-12-30 14:29:53 +00:00
cake
308c220735 Fixed auto prune options locked 2025-12-30 02:08:54 +01:00
defnotken
de2b537fb1 bump
All checks were successful
Tag and Release Lightless / tag-and-release (push) Successful in 2m7s
2025-12-27 22:03:19 -06:00
defnotken
838f4d1b1b Merge branch '2.0.2' into dev 2025-12-27 22:02:45 -06:00
defnotken
3a838077ac Merge branch '2.0.2' into dev
All checks were successful
Tag and Release Lightless / tag-and-release (push) Successful in 2m10s
2025-12-27 21:40:07 -06:00
defnotken
fe9122e0d2 build out dev 2025-12-27 20:50:09 -06:00
3 changed files with 41 additions and 25 deletions

View File

@@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<Authors></Authors> <Authors></Authors>
<Company></Company> <Company></Company>
<Version>2.0.2</Version> <Version>2.0.1.71</Version>
<Description></Description> <Description></Description>
<Copyright></Copyright> <Copyright></Copyright>
<PackageProjectUrl>https://github.com/Light-Public-Syncshells/LightlessClient</PackageProjectUrl> <PackageProjectUrl>https://github.com/Light-Public-Syncshells/LightlessClient</PackageProjectUrl>

View File

@@ -392,25 +392,27 @@ public class SyncshellAdminUI : WindowMediatorSubscriberBase
} }
UiSharedService.AttachToolTip("When enabled, inactive non-pinned, non-moderator users will be pruned automatically on the server."); UiSharedService.AttachToolTip("When enabled, inactive non-pinned, non-moderator users will be pruned automatically on the server.");
if (!_autoPruneEnabled)
{
ImGui.BeginDisabled();
}
ImGui.SameLine(); ImGui.SameLine();
ImGui.SetNextItemWidth(150); ImGui.SetNextItemWidth(150);
using (ImRaii.Disabled(!_autoPruneEnabled))
{
_uiSharedService.DrawCombo( _uiSharedService.DrawCombo(
"Day(s) of inactivity", "Day(s) of inactivity (gets checked hourly)",
[1, 3, 7, 14, 30, 90], [0, 1, 3, 7, 14, 30, 90],
days => $"{days} day(s)", (count) => count == 0 ? "2 hours(s)" : count + " day(s)",
selected => selected =>
{ {
_autoPruneDays = selected; _autoPruneDays = selected;
SavePruneSettings(); SavePruneSettings();
}, },
_autoPruneDays); _autoPruneDays);
}
if (!_autoPruneEnabled) if (!_autoPruneEnabled)
{ {
ImGui.EndDisabled();
UiSharedService.ColorTextWrapped( UiSharedService.ColorTextWrapped(
"Automatic prune is currently disabled. Enable it and choose an inactivity threshold to let the server clean up inactive users automatically.", "Automatic prune is currently disabled. Enable it and choose an inactivity threshold to let the server clean up inactive users automatically.",
ImGuiColors.DalamudGrey); ImGuiColors.DalamudGrey);
@@ -593,7 +595,7 @@ public class SyncshellAdminUI : WindowMediatorSubscriberBase
_uiSharedService.DrawCombo( _uiSharedService.DrawCombo(
"Day(s) of inactivity", "Day(s) of inactivity",
[0, 1, 3, 7, 14, 30, 90], [0, 1, 3, 7, 14, 30, 90],
(count) => count == 0 ? "15 minute(s)" : count + " day(s)", (count) => count == 0 ? "2 hours(s)" : count + " day(s)",
(selected) => (selected) =>
{ {
_pruneDays = selected; _pruneDays = selected;
@@ -1093,6 +1095,7 @@ public class SyncshellAdminUI : WindowMediatorSubscriberBase
ImGui.Dummy(new Vector2(0, 4 * ImGuiHelpers.GlobalScale)); ImGui.Dummy(new Vector2(0, 4 * ImGuiHelpers.GlobalScale));
} }
private void SavePruneSettings() private void SavePruneSettings()
{ {
if (_autoPruneDays <= 0) if (_autoPruneDays <= 0)
@@ -1100,8 +1103,7 @@ public class SyncshellAdminUI : WindowMediatorSubscriberBase
_autoPruneEnabled = false; _autoPruneEnabled = false;
} }
var enabled = _autoPruneEnabled && _autoPruneDays > 0; var dto = new GroupPruneSettingsDto(Group: GroupFullInfo.Group, AutoPruneEnabled: _autoPruneEnabled, AutoPruneDays: _autoPruneDays);
var dto = new GroupPruneSettingsDto(Group: GroupFullInfo.Group, AutoPruneEnabled: enabled, AutoPruneDays: enabled ? _autoPruneDays : 0);
try try
{ {

View File

@@ -502,6 +502,14 @@ public partial class FileDownloadManager : DisposableMediatorSubscriberBase
} }
} }
private void RemoveStatus(string key)
{
lock (_downloadStatusLock)
{
_downloadStatus.Remove(key);
}
}
private async Task DecompressBlockFileAsync( private async Task DecompressBlockFileAsync(
string downloadStatusKey, string downloadStatusKey,
string blockFilePath, string blockFilePath,
@@ -595,6 +603,10 @@ public partial class FileDownloadManager : DisposableMediatorSubscriberBase
{ {
Logger.LogError(ex, "{dlName}: Error during block file read", downloadLabel); Logger.LogError(ex, "{dlName}: Error during block file read", downloadLabel);
} }
finally
{
RemoveStatus(downloadStatusKey);
}
} }
public async Task<List<DownloadFileTransfer>> InitiateDownloadList( public async Task<List<DownloadFileTransfer>> InitiateDownloadList(
@@ -866,6 +878,8 @@ public partial class FileDownloadManager : DisposableMediatorSubscriberBase
MarkTransferredFiles(directDownload.DirectDownloadUrl!, 1); MarkTransferredFiles(directDownload.DirectDownloadUrl!, 1);
Logger.LogDebug("Finished direct download of {hash}.", directDownload.Hash); Logger.LogDebug("Finished direct download of {hash}.", directDownload.Hash);
RemoveStatus(directDownload.DirectDownloadUrl!);
} }
catch (OperationCanceledException ex) catch (OperationCanceledException ex)
{ {