mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 22:17:22 +01:00
fixes only manip data being sent and not applied, adjustments to file scanner max size calc
This commit is contained in:
parent
e461c6d5c9
commit
69e8f3be83
2 changed files with 4 additions and 7 deletions
|
|
@ -135,11 +135,11 @@ public class PeriodicFileScanner : MediatorSubscriberBase, IDisposable
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (FileCacheSize < (long)_configService.Current.MaxLocalCacheInGiB * 1024 * 1024 * 1024) return false;
|
if (FileCacheSize < (long)(_configService.Current.MaxLocalCacheInGiB * 1024 * 1024 * 1024)) return false;
|
||||||
|
|
||||||
var allFiles = Directory.EnumerateFiles(_configService.Current.CacheFolder)
|
var allFiles = Directory.EnumerateFiles(_configService.Current.CacheFolder)
|
||||||
.Select(f => new FileInfo(f)).OrderBy(f => f.LastAccessTime).ToList();
|
.Select(f => new FileInfo(f)).OrderBy(f => f.LastAccessTime).ToList();
|
||||||
while (FileCacheSize > (long)_configService.Current.MaxLocalCacheInGiB * 1024 * 1024 * 1024)
|
while (FileCacheSize > (long)(_configService.Current.MaxLocalCacheInGiB * 1024 * 1024 * 1024))
|
||||||
{
|
{
|
||||||
var oldestFile = allFiles[0];
|
var oldestFile = allFiles[0];
|
||||||
FileCacheSize -= oldestFile.Length;
|
FileCacheSize -= oldestFile.Length;
|
||||||
|
|
|
||||||
|
|
@ -403,13 +403,10 @@ public class CachedPlayer : MediatorSubscriberBase, IDisposable
|
||||||
_applicationId = Guid.NewGuid();
|
_applicationId = Guid.NewGuid();
|
||||||
_logger.LogDebug("[{applicationId}] Starting application task", _applicationId);
|
_logger.LogDebug("[{applicationId}] Starting application task", _applicationId);
|
||||||
|
|
||||||
if (updateModdedPaths)
|
if (updateModdedPaths && (moddedPaths.Any() || !string.IsNullOrEmpty(charaData.ManipulationData)))
|
||||||
{
|
|
||||||
if (moddedPaths.Any())
|
|
||||||
{
|
{
|
||||||
ApplyBaseData(_applicationId, moddedPaths, charaData.ManipulationData);
|
ApplyBaseData(_applicationId, moddedPaths, charaData.ManipulationData);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var kind in updatedData)
|
foreach (var kind in updatedData)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue