update db CacheSize

This commit is contained in:
Luke Pulverenti 2017-05-13 15:32:10 -04:00
parent 0beb803aed
commit 8e7b6f6bca
2 changed files with 37 additions and 40 deletions

View File

@ -124,7 +124,7 @@ namespace Emby.Server.Implementations.Data
if (CacheSize.HasValue)
{
queries.Add("PRAGMA cache_size=-" + CacheSize.Value.ToString(CultureInfo.InvariantCulture));
queries.Add("PRAGMA cache_size=" + CacheSize.Value.ToString(CultureInfo.InvariantCulture));
}
if (EnableTempStoreMemory)
@ -132,12 +132,6 @@ namespace Emby.Server.Implementations.Data
queries.Add("PRAGMA temp_store = memory");
}
//var cacheSize = CacheSize;
//if (cacheSize.HasValue)
//{
//}
////foreach (var query in queries)
////{
//// db.Execute(query);

View File

@ -142,7 +142,7 @@ namespace Emby.Server.Implementations.Data
= "create table if not exists mediastreams (ItemId GUID, StreamIndex INT, StreamType TEXT, Codec TEXT, Language TEXT, ChannelLayout TEXT, Profile TEXT, AspectRatio TEXT, Path TEXT, IsInterlaced BIT, BitRate INT NULL, Channels INT NULL, SampleRate INT NULL, IsDefault BIT, IsForced BIT, IsExternal BIT, Height INT NULL, Width INT NULL, AverageFrameRate FLOAT NULL, RealFrameRate FLOAT NULL, Level FLOAT NULL, PixelFormat TEXT, BitDepth INT NULL, IsAnamorphic BIT NULL, RefFrames INT NULL, CodecTag TEXT NULL, Comment TEXT NULL, NalLengthSize TEXT NULL, IsAvc BIT NULL, Title TEXT NULL, TimeBase TEXT NULL, CodecTimeBase TEXT NULL, PRIMARY KEY (ItemId, StreamIndex))";
string[] queries = {
"PRAGMA locking_mode=NORMAL",
"PRAGMA locking_mode=EXCLUSIVE",
"create table if not exists TypedBaseItems (guid GUID primary key NOT NULL, type TEXT NOT NULL, data BLOB NULL, ParentId GUID NULL, Path TEXT NULL)",
@ -1258,22 +1258,6 @@ namespace Emby.Server.Implementations.Data
{
if (_config.Configuration.SkipDeserializationForBasicTypes)
{
if (type == typeof(MusicGenre))
{
return false;
}
if (type == typeof(GameGenre))
{
return false;
}
if (type == typeof(Genre))
{
return false;
}
if (type == typeof(Studio))
{
return false;
}
if (type == typeof(Person))
{
return false;
@ -1282,26 +1266,10 @@ namespace Emby.Server.Implementations.Data
{
return false;
}
if (type == typeof(ManualCollectionsFolder))
{
return false;
}
if (type == typeof(CameraUploadsFolder))
{
return false;
}
if (type == typeof(PlaylistsFolder))
{
return false;
}
if (type == typeof(UserRootFolder))
{
return false;
}
if (type == typeof(PhotoAlbum))
{
return false;
}
if (type == typeof(Season))
{
return false;
@ -1312,6 +1280,41 @@ namespace Emby.Server.Implementations.Data
}
}
if (type == typeof(MusicGenre))
{
return false;
}
if (type == typeof(GameGenre))
{
return false;
}
if (type == typeof(Genre))
{
return false;
}
if (type == typeof(Studio))
{
return false;
}
if (type == typeof(ManualCollectionsFolder))
{
return false;
}
if (type == typeof(CameraUploadsFolder))
{
return false;
}
if (type == typeof(PlaylistsFolder))
{
return false;
}
if (type == typeof(PhotoAlbum))
{
return false;
}
if (type == typeof(Year))
{
return false;