update .net core startup

This commit is contained in:
Luke Pulverenti
2016-11-20 18:48:52 -05:00
parent 94e622e3a0
commit e297e90bce
9 changed files with 127 additions and 62 deletions

View File

@@ -12,12 +12,22 @@ namespace Emby.Server.Implementations.Data
public abstract class BaseSqliteRepository : IDisposable
{
protected string DbFilePath { get; set; }
protected ReaderWriterLockSlim WriteLock = new ReaderWriterLockSlim(LockRecursionPolicy.NoRecursion);
protected ReaderWriterLockSlim WriteLock;
protected ILogger Logger { get; private set; }
protected BaseSqliteRepository(ILogger logger)
{
Logger = logger;
WriteLock = AllowLockRecursion ?
new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion) :
new ReaderWriterLockSlim(LockRecursionPolicy.NoRecursion);
}
protected virtual bool AllowLockRecursion
{
get { return false; }
}
protected virtual bool EnableConnectionPooling
@@ -86,7 +96,7 @@ namespace Emby.Server.Implementations.Data
var cacheSize = CacheSize;
if (cacheSize.HasValue)
{
}
if (EnableExclusiveMode)
@@ -206,11 +216,7 @@ namespace Emby.Server.Implementations.Data
return;
}
connection.ExecuteAll(string.Join(";", new string[]
{
"alter table " + table,
"add column " + columnName + " " + type + " NULL"
}));
connection.Execute("alter table " + table + " add column " + columnName + " " + type + " NULL");
}
}

View File

@@ -95,6 +95,14 @@ namespace Emby.Server.Implementations.Data
DbFilePath = Path.Combine(_config.ApplicationPaths.DataPath, "library.db");
}
protected override bool AllowLockRecursion
{
get
{
return true;
}
}
private const string ChaptersTableName = "Chapters2";
protected override int? CacheSize

View File

@@ -89,7 +89,10 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
{
Url = url,
CancellationToken = cancellationToken,
BufferContent = false
BufferContent = false,
// Increase a little bit
TimeoutMs = 30000
}, "GET").ConfigureAwait(false))
{