mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-15 07:54:15 +01:00
add periodic file scanner, parallelize downloads, fix transient files being readded when not necessary, fix disposal of players on plugin shutdown
This commit is contained in:
parent
25e87e6ec2
commit
0d7e173a97
20 changed files with 641 additions and 525 deletions
|
|
@ -1,12 +1,36 @@
|
|||
#nullable disable
|
||||
|
||||
|
||||
namespace MareSynchronos.FileCacheDB
|
||||
{
|
||||
public partial class FileCache
|
||||
|
||||
public class FileCache
|
||||
{
|
||||
public string Hash { get; set; }
|
||||
public string Filepath { get; set; }
|
||||
public string LastModifiedDate { get; set; }
|
||||
public int Version { get; set; }
|
||||
private FileCacheEntity entity;
|
||||
public string Filepath { get; private set; }
|
||||
public string Hash { get; private set; }
|
||||
public string OriginalFilepath => entity.Filepath;
|
||||
public string OriginalHash => entity.Hash;
|
||||
public long LastModifiedDateTicks => long.Parse(entity.LastModifiedDate);
|
||||
|
||||
public FileCache(FileCacheEntity entity)
|
||||
{
|
||||
this.entity = entity;
|
||||
}
|
||||
|
||||
public void SetResolvedFilePath(string filePath)
|
||||
{
|
||||
Filepath = filePath.ToLowerInvariant();
|
||||
}
|
||||
|
||||
public void SetHash(string hash)
|
||||
{
|
||||
Hash = hash;
|
||||
}
|
||||
|
||||
public void UpdateFileCache(FileCacheEntity entity)
|
||||
{
|
||||
this.entity = entity;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue