mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-02-11 07:02:24 +00:00
update .net core startup
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user