mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-15 04:14: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
|
|
@ -9,7 +9,7 @@ namespace MareSynchronos.FileCacheDB
|
|||
public partial class FileCacheContext : DbContext
|
||||
{
|
||||
private string DbPath { get; set; }
|
||||
public FileCacheContext()
|
||||
public FileCacheContext()
|
||||
{
|
||||
DbPath = Path.Combine(Plugin.PluginInterface.ConfigDirectory.FullName, "FileCache.db");
|
||||
string oldDbPath = Path.Combine(Plugin.PluginInterface.ConfigDirectory.FullName, "FileCacheDebug.db");
|
||||
|
|
@ -36,7 +36,7 @@ namespace MareSynchronos.FileCacheDB
|
|||
{
|
||||
}
|
||||
|
||||
public virtual DbSet<FileCache> FileCaches { get; set; }
|
||||
public virtual DbSet<FileCacheEntity> FileCaches { get; set; }
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
|
|
@ -48,7 +48,7 @@ namespace MareSynchronos.FileCacheDB
|
|||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.Entity<FileCache>(entity =>
|
||||
modelBuilder.Entity<FileCacheEntity>(entity =>
|
||||
{
|
||||
entity.HasKey(e => new { e.Hash, e.Filepath });
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue