update components

This commit is contained in:
Luke Pulverenti 2016-11-19 02:51:07 -05:00
parent 65a1ef020b
commit ffb1ec76a7
10 changed files with 44 additions and 17 deletions

View File

@ -5,6 +5,7 @@ using System.Threading.Tasks;
using MediaBrowser.Model.Logging;
using SQLitePCL.pretty;
using System.Linq;
using SQLitePCL;
namespace Emby.Server.Implementations.Data
{
@ -24,12 +25,20 @@ namespace Emby.Server.Implementations.Data
get { return true; }
}
protected virtual SQLiteDatabaseConnection CreateConnection(bool isReadOnly = false)
static BaseSqliteRepository()
{
SQLite3.EnableSharedCache = false;
int rc = raw.sqlite3_config(raw.SQLITE_CONFIG_MEMSTATUS, 0);
//CheckOk(rc);
}
protected virtual SQLiteDatabaseConnection CreateConnection(bool isReadOnly = false)
{
ConnectionFlags connectionFlags;
//isReadOnly = false;
if (isReadOnly)
{
connectionFlags = ConnectionFlags.ReadOnly;
@ -74,6 +83,23 @@ namespace Emby.Server.Implementations.Data
return db;
}
internal static void CheckOk(int rc)
{
string msg = "";
if (raw.SQLITE_OK != rc)
{
throw CreateException((ErrorCode)rc, msg);
}
}
internal static Exception CreateException(ErrorCode rc, string msg)
{
var exp = new Exception(msg);
return exp;
}
private bool _disposed;
protected void CheckDisposed()
{

View File

@ -315,7 +315,7 @@
<Private>True</Private>
</Reference>
<Reference Include="SQLitePCLRaw.core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1488e028ca7ab535, processorArchitecture=MSIL">
<HintPath>..\packages\SQLitePCLRaw.core.1.1.0\lib\portable-net45+netcore45+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\SQLitePCLRaw.core.dll</HintPath>
<HintPath>..\packages\SQLitePCLRaw.core.1.1.1-pre20161109081005\lib\portable-net45+netcore45+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\SQLitePCLRaw.core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="UniversalDetector, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">

View File

@ -3,6 +3,6 @@
<package id="Emby.XmlTv" version="1.0.1" targetFramework="portable45-net45+win8" />
<package id="MediaBrowser.Naming" version="1.0.2" targetFramework="portable45-net45+win8" />
<package id="SQLitePCL.pretty" version="1.1.0" targetFramework="portable45-net45+win8" />
<package id="SQLitePCLRaw.core" version="1.1.0" targetFramework="portable45-net45+win8" />
<package id="SQLitePCLRaw.core" version="1.1.1-pre20161109081005" targetFramework="portable45-net45+win8" />
<package id="UniversalDetector" version="1.0.1" targetFramework="portable45-net45+win8" />
</packages>

View File

@ -81,8 +81,9 @@ namespace MediaBrowser.MediaEncoding.Encoder
{
output = GetProcessOutput(encoderAppPath, "-decoders");
}
catch
catch (Exception )
{
//_logger.ErrorException("Error detecting available decoders", ex);
}
var found = new List<string>();

View File

@ -932,7 +932,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
var process = _processFactory.Create(new ProcessOptions
{
CreateNoWindow = true,
UseShellExecute = false,
UseShellExecute = true,
FileName = FFMpegPath,
Arguments = args,
IsHidden = true,
@ -1035,7 +1035,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
var process = _processFactory.Create(new ProcessOptions
{
CreateNoWindow = true,
UseShellExecute = false,
UseShellExecute = true,
FileName = FFMpegPath,
Arguments = args,
IsHidden = true,

View File

@ -451,7 +451,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
var process = _processFactory.Create(new ProcessOptions
{
CreateNoWindow = true,
UseShellExecute = false,
UseShellExecute = true,
FileName = _mediaEncoder.EncoderPath,
Arguments = string.Format("{0} -i \"{1}\" -c:s srt \"{2}\"", encodingParam, inputPath, outputPath),
@ -582,7 +582,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
var process = _processFactory.Create(new ProcessOptions
{
CreateNoWindow = true,
UseShellExecute = false,
UseShellExecute = true,
FileName = _mediaEncoder.EncoderPath,
Arguments = processArgs,

View File

@ -85,11 +85,11 @@
<Private>True</Private>
</Reference>
<Reference Include="SQLitePCLRaw.core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1488e028ca7ab535, processorArchitecture=MSIL">
<HintPath>..\packages\SQLitePCLRaw.core.1.1.0\lib\net45\SQLitePCLRaw.core.dll</HintPath>
<HintPath>..\packages\SQLitePCLRaw.core.1.1.1-pre20161109081005\lib\net45\SQLitePCLRaw.core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SQLitePCLRaw.provider.sqlite3, Version=1.0.0.0, Culture=neutral, PublicKeyToken=62684c7b4f184e3f, processorArchitecture=MSIL">
<HintPath>..\packages\SQLitePCLRaw.provider.sqlite3.net45.1.1.0\lib\net45\SQLitePCLRaw.provider.sqlite3.dll</HintPath>
<HintPath>..\packages\SQLitePCLRaw.provider.sqlite3.net45.1.1.1-pre20161109081005\lib\net45\SQLitePCLRaw.provider.sqlite3.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />

View File

@ -5,6 +5,6 @@
<package id="ServiceStack.Text" version="4.5.4" targetFramework="net46" />
<package id="SharpCompress" version="0.14.0" targetFramework="net46" />
<package id="SimpleInjector" version="3.2.4" targetFramework="net46" />
<package id="SQLitePCLRaw.core" version="1.1.0" targetFramework="net46" />
<package id="SQLitePCLRaw.provider.sqlite3.net45" version="1.1.0" targetFramework="net46" />
<package id="SQLitePCLRaw.core" version="1.1.1-pre20161109081005" targetFramework="net46" />
<package id="SQLitePCLRaw.provider.sqlite3.net45" version="1.1.1-pre20161109081005" targetFramework="net46" />
</packages>

View File

@ -91,11 +91,11 @@
<Private>True</Private>
</Reference>
<Reference Include="SQLitePCLRaw.core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1488e028ca7ab535, processorArchitecture=MSIL">
<HintPath>..\packages\SQLitePCLRaw.core.1.1.0\lib\net45\SQLitePCLRaw.core.dll</HintPath>
<HintPath>..\packages\SQLitePCLRaw.core.1.1.1-pre20161109081005\lib\net45\SQLitePCLRaw.core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SQLitePCLRaw.provider.sqlite3, Version=1.0.0.0, Culture=neutral, PublicKeyToken=62684c7b4f184e3f, processorArchitecture=MSIL">
<HintPath>..\packages\SQLitePCLRaw.provider.sqlite3.net45.1.1.0\lib\net45\SQLitePCLRaw.provider.sqlite3.dll</HintPath>
<HintPath>..\packages\SQLitePCLRaw.provider.sqlite3.net45.1.1.1-pre20161109081005\lib\net45\SQLitePCLRaw.provider.sqlite3.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />

View File

@ -5,6 +5,6 @@
<package id="ServiceStack.Text" version="4.5.4" targetFramework="net462" />
<package id="SharpCompress" version="0.14.0" targetFramework="net462" />
<package id="SimpleInjector" version="3.2.4" targetFramework="net462" />
<package id="SQLitePCLRaw.core" version="1.1.0" targetFramework="net462" />
<package id="SQLitePCLRaw.provider.sqlite3.net45" version="1.1.0" targetFramework="net462" />
<package id="SQLitePCLRaw.core" version="1.1.1-pre20161109081005" targetFramework="net462" />
<package id="SQLitePCLRaw.provider.sqlite3.net45" version="1.1.1-pre20161109081005" targetFramework="net462" />
</packages>