Compare commits

..

6 Commits

Author SHA1 Message Date
ce81371a23 Merge pull request 'Adding new way for checking cleaned paths. adding more logging.' (#29) from file-cache-attempt into 1.11.9
Reviewed-on: #29
2025-09-13 04:41:28 +02:00
defnotken
0f72ec4e46 Adding null check to exception logger 2025-09-12 21:37:07 -05:00
CakeAndBanana
328914df03 Adding new way for checking cleaned paths. adding more logging. 2025-09-13 04:34:52 +02:00
8c308ab488 1.11.8 Hottofixo
All checks were successful
Tag and Release Lightless / tag-and-release (push) Successful in 38s
Co-authored-by: defnotken <itsdefnotken@gmail.com>
Co-authored-by: cake <cake@noreply.git.lightless-sync.org>
Reviewed-on: #26
2025-09-12 07:10:37 +02:00
a8512e2a86 1.11.7 hotfix
All checks were successful
Tag and Release Lightless / tag-and-release (push) Successful in 36s
Co-authored-by: defnotken <itsdefnotken@gmail.com>
Reviewed-on: #25
2025-09-12 01:14:23 +02:00
abe28e931c 1.11.6 (#4)
All checks were successful
Tag and Release Lightless / tag-and-release (push) Successful in 36s
1.11.6 Changelog (In Progress)
---
* Update submodule reference
* Update dalamud sdk
* Reworked the Syncshell Admin Page
   - Fixed that owners are visible in the list, Removed Pin/Remove/Ban buttons on Owners.
   - Styling is done similiar as settings page.
   - Added 1 or 3 day(s) option for inactive check.
+ Added new functions on the Server Top Bar button
   - Right click on the button will disconnect you from Lightless
   - Shift+Left click will open the settings page
+ Added colors section in the settings to change accent colors.
   - The nameplate coloring has been moved to this section
+ Added pin option from Dalamud in the UI.
+ Added ability to pause syncing while going in Instance/Duty
+ Added functionality to make syncshell folders
+ Fixed nameplate bug in PVP
+ added self-threshold warning

Co-authored-by: defnotken <itsdefnotken@gmail.com>
Co-authored-by: CakeAndBanana <admin@cakeandbanana.nl>
Co-authored-by: thijmenh <thijmenhogenkamp@gmail.com>
Co-authored-by: choco <choco@noreply.git.lightless-sync.org>
Co-authored-by: cake <cake@noreply.git.lightless-sync.org>
Co-authored-by: choco <thijmenhogenkamp@gmail.com>
Reviewed-on: #4
2025-09-11 23:43:11 +02:00
6 changed files with 81 additions and 33 deletions

View File

@@ -583,7 +583,14 @@ public sealed class CacheMonitor : DisposableMediatorSubscriberBase
}
catch (Exception ex)
{
Logger.LogWarning(ex, "Failed validating {path}", workload.ResolvedFilepath);
if (workload != null)
{
Logger.LogWarning(ex, "Failed validating {path}", workload.ResolvedFilepath);
}
else
{
Logger.LogWarning(ex, "Failed validating unknown workload");
}
}
Interlocked.Increment(ref _currentFileProgress);
}
@@ -647,6 +654,12 @@ public sealed class CacheMonitor : DisposableMediatorSubscriberBase
CancellationToken = ct
}, (cachePath) =>
{
if (_fileDbManager == null || _ipcManager?.Penumbra == null || cachePath == null)
{
Logger.LogTrace("Potential null in db: {isDbNull} penumbra: {isPenumbraNull} cachepath: {isPathNull}", _fileDbManager == null, _ipcManager?.Penumbra == null, cachePath == null);
return;
}
if (ct.IsCancellationRequested) return;
if (!_ipcManager.Penumbra.APIAvailable)

View File

@@ -180,21 +180,32 @@ public sealed class FileCacheManager : IHostedService
try
{
var cleanedPaths = paths.Distinct(StringComparer.OrdinalIgnoreCase).ToDictionary(p => p,
p => p.Replace("/", "\\", StringComparison.OrdinalIgnoreCase)
var cleanedPaths = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
foreach (var p in paths)
{
var cleaned = p.Replace("/", "\\", StringComparison.OrdinalIgnoreCase)
.Replace(_ipcManager.Penumbra.ModDirectory!, _ipcManager.Penumbra.ModDirectory!.EndsWith('\\') ? PenumbraPrefix + '\\' : PenumbraPrefix, StringComparison.OrdinalIgnoreCase)
.Replace(_configService.Current.CacheFolder, _configService.Current.CacheFolder.EndsWith('\\') ? CachePrefix + '\\' : CachePrefix, StringComparison.OrdinalIgnoreCase)
.Replace("\\\\", "\\", StringComparison.Ordinal),
StringComparer.OrdinalIgnoreCase);
.Replace("\\\\", "\\", StringComparison.Ordinal);
if (!cleanedPaths.ContainsValue(cleaned))
{
_logger.LogDebug("Adding to cleanedPaths: {cleaned}", cleaned);
cleanedPaths[p] = cleaned;
} else
{
_logger.LogWarning("Duplicated found: {cleaned}", cleaned);
}
}
Dictionary<string, FileCacheEntity?> result = new(StringComparer.OrdinalIgnoreCase);
var dict = _fileCaches.SelectMany(f => f.Value)
var dict = _fileCaches.SelectMany(f => f.Value).Distinct()
.ToDictionary(d => d.PrefixedFilePath, d => d, StringComparer.OrdinalIgnoreCase);
foreach (var entry in cleanedPaths)
{
//_logger.LogDebug("Checking {path}", entry.Value);
_logger.LogDebug("Checking if in cache: {path}", entry.Value);
if (dict.TryGetValue(entry.Value, out var entity))
{

View File

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

View File

@@ -299,7 +299,7 @@ public class ServerConfigurationManager
internal void AddPairTag(string tag)
{
if (tag.Length > _maxCharactersFolder)
if (tag.Length <= _maxCharactersFolder)
{
CurrentPairTagStorage().ServerAvailablePairTags.Add(tag);
_pairTagConfig.Save();
@@ -313,7 +313,7 @@ public class ServerConfigurationManager
internal void AddSyncshellTag(string tag)
{
if (tag.Length > _maxCharactersFolder)
if (tag.Length <= _maxCharactersFolder)
{
CurrentSyncshellTagStorage().ServerAvailableSyncshellTags.Add(tag);
_syncshellTagConfig.Save();

View File

@@ -416,10 +416,6 @@ public class CompactUi : WindowMediatorSubscriberBase
//Getting information of character and triangles threshold to show overlimit status in UID bar.
_cachedAnalysis = _characterAnalyzer.LastAnalysis.DeepClone();
var groupedfiles = _cachedAnalysis.First().Value.Select(v => v.Value).GroupBy(f => f.FileType, StringComparer.Ordinal)
.OrderBy(k => k.Key, StringComparer.Ordinal).ToList();
var actualTriCount = _cachedAnalysis.First().Value.Sum(f => f.Value.Triangles);
var isOverTriHold = actualTriCount > (_playerPerformanceConfig.Current.TrisWarningThresholdThousands * 1000);
using (_uiSharedService.UidFont.Push())
{
@@ -428,30 +424,58 @@ public class CompactUi : WindowMediatorSubscriberBase
ImGui.TextColored(GetUidColor(), uidText);
}
if (groupedfiles != null)
UiSharedService.AttachToolTip("Click to copy");
if (ImGui.IsItemClicked())
{
//Checking of VRAM threshhold
var actualVramUsage = groupedfiles.SingleOrDefault(v => string.Equals(v.Key, "tex", StringComparison.Ordinal)).Sum(f => f.OriginalSize);
var isOverVRAMUsage = _playerPerformanceConfig.Current.VRAMSizeWarningThresholdMiB * 1024 * 1024 < actualVramUsage;
ImGui.SetClipboardText(uidText);
}
if (isOverTriHold || isOverVRAMUsage)
if (_cachedAnalysis != null)
{
var firstEntry = _cachedAnalysis.FirstOrDefault();
var valueDict = firstEntry.Value;
if (valueDict != null && valueDict.Count > 0)
{
ImGui.SameLine();
_uiSharedService.IconText(FontAwesomeIcon.ExclamationTriangle, UIColors.Get("LightlessYellow"));
string warningMessage = "";
if (isOverTriHold)
{
warningMessage += $"You exceed your own triangles threshold by " +
$"{actualTriCount - _playerPerformanceConfig.Current.TrisWarningThresholdThousands * 1000} triangles.";
warningMessage += Environment.NewLine;
var groupedfiles = valueDict
.Select(v => v.Value)
.Where(v => v != null)
.GroupBy(f => f.FileType, StringComparer.Ordinal)
.OrderBy(k => k.Key, StringComparer.Ordinal)
.ToList();
}
if (isOverVRAMUsage)
var actualTriCount = valueDict
.Select(v => v.Value)
.Where(v => v != null)
.Sum(f => f.Triangles);
if (groupedfiles != null)
{
warningMessage += $"You exceed your own VRAM threshold by " +
$"{UiSharedService.ByteToString(actualVramUsage - (_playerPerformanceConfig.Current.VRAMSizeWarningThresholdMiB * 1024 * 1024))}.";
//Checking of VRAM threshhold
var texGroup = groupedfiles.SingleOrDefault(v => string.Equals(v.Key, "tex", StringComparison.Ordinal));
var actualVramUsage = texGroup != null ? texGroup.Sum(f => f.OriginalSize) : 0L;
var isOverVRAMUsage = _playerPerformanceConfig.Current.VRAMSizeWarningThresholdMiB * 1024 * 1024 < actualVramUsage;
var isOverTriHold = actualTriCount > (_playerPerformanceConfig.Current.TrisWarningThresholdThousands * 1000);
if ((isOverTriHold || isOverVRAMUsage) && _playerPerformanceConfig.Current.WarnOnExceedingThresholds)
{
ImGui.SameLine();
_uiSharedService.IconText(FontAwesomeIcon.ExclamationTriangle, UIColors.Get("LightlessYellow"));
string warningMessage = "";
if (isOverTriHold)
{
warningMessage += $"You exceed your own triangles threshold by " +
$"{actualTriCount - _playerPerformanceConfig.Current.TrisWarningThresholdThousands * 1000} triangles.";
warningMessage += Environment.NewLine;
}
if (isOverVRAMUsage)
{
warningMessage += $"You exceed your own VRAM threshold by " +
$"{UiSharedService.ByteToString(actualVramUsage - (_playerPerformanceConfig.Current.VRAMSizeWarningThresholdMiB * 1024 * 1024))}.";
}
UiSharedService.AttachToolTip(warningMessage);
}
}
UiSharedService.AttachToolTip(warningMessage);
}
}

View File

@@ -169,7 +169,7 @@ public class DownloadUi : WindowMediatorSubscriberBase
var dlProgressPercent = transferredBytes / (double)totalBytes;
drawList.AddRectFilled(dlBarStart,
dlBarEnd with { X = dlBarStart.X + (float)(dlProgressPercent * dlBarWidth) },
UiSharedService.Color(173, 138, 245, transparency), 1);
UiSharedService.Color(UIColors.Get("LightlessPurple")));
if (_configService.Current.TransferBarsShowText)
{