diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-29 14:12:37 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-29 14:12:37 -0500 |
| commit | 61e195c096dfc2c5713bbbcbc0be73ddff99cb55 (patch) | |
| tree | 5680960d1898267b29d8de42eda0e5ec9ab6e0d7 /Emby.Server.Implementations/Data/SqliteItemRepository.cs | |
| parent | 9ecfb4fd823be8fbca8e9bbc242fc8a025c6d3a5 (diff) | |
update repositories
Diffstat (limited to 'Emby.Server.Implementations/Data/SqliteItemRepository.cs')
| -rw-r--r-- | Emby.Server.Implementations/Data/SqliteItemRepository.cs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs index 54820ab53..9c096916f 100644 --- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs +++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs @@ -157,12 +157,7 @@ namespace Emby.Server.Implementations.Data { using (var connection = CreateConnection()) { - connection.ExecuteAll(string.Join(";", new[] - { - "PRAGMA page_size=4096", - "PRAGMA default_temp_store=memory", - "PRAGMA temp_store=memory" - })); + RunDefaultInitialization(connection); var createMediaStreamsTableCommand = "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))"; @@ -396,9 +391,9 @@ namespace Emby.Server.Implementations.Data { try { - using (WriteLock.Write()) + using (var connection = CreateConnection()) { - using (var connection = CreateConnection()) + using (WriteLock.Write()) { connection.RunQueries(new string[] { |
