fixes for pet handling, uploads, clear storage button, remove button while reconnecting, put paused to online/paused, put visible to online
This commit is contained in:
@@ -8,18 +8,18 @@ public class FileReplacement
|
||||
{
|
||||
public FileReplacement(List<string> gamePaths, string filePath, FileCacheManager fileDbManager)
|
||||
{
|
||||
GamePaths = gamePaths.Select(g => g.Replace('\\', '/')).ToList();
|
||||
GamePaths = gamePaths.Select(g => g.Replace('\\', '/')).ToHashSet(StringComparer.Ordinal);
|
||||
ResolvedPath = filePath.Replace('\\', '/');
|
||||
HashLazy = new(() => !IsFileSwap ? fileDbManager.GetFileCacheByPath(ResolvedPath)?.Hash ?? string.Empty : string.Empty);
|
||||
}
|
||||
|
||||
public bool Computed => IsFileSwap || !HasFileReplacement || !string.IsNullOrEmpty(Hash);
|
||||
|
||||
public List<string> GamePaths { get; init; } = new();
|
||||
public HashSet<string> GamePaths { get; init; } = new();
|
||||
|
||||
public bool HasFileReplacement => GamePaths.Count >= 1 && GamePaths.Any(p => !string.Equals(p, ResolvedPath, StringComparison.Ordinal));
|
||||
|
||||
public bool IsFileSwap => !Regex.IsMatch(ResolvedPath, @"^[a-zA-Z]:(/|\\)", RegexOptions.ECMAScript) && !string.Equals(GamePaths[0], ResolvedPath, StringComparison.Ordinal);
|
||||
public bool IsFileSwap => !Regex.IsMatch(ResolvedPath, @"^[a-zA-Z]:(/|\\)", RegexOptions.ECMAScript) && !string.Equals(GamePaths.First(), ResolvedPath, StringComparison.Ordinal);
|
||||
|
||||
public string Hash => HashLazy.Value;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user