Luke Pulverenti 11 years ago
commit 54b20dcbb8

@ -37,10 +37,6 @@
<Reference Include="Alchemy">
<HintPath>..\packages\Alchemy.2.2.1\lib\net40\Alchemy.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.OrmLite, Version=3.9.60.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ServiceStack.OrmLite.Sqlite32.3.9.63\lib\net40\ServiceStack.OrmLite.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.OrmLite.SqliteNET">
<HintPath>..\packages\ServiceStack.OrmLite.Sqlite32.3.9.63\lib\net40\ServiceStack.OrmLite.SqliteNET.dll</HintPath>
</Reference>
@ -97,6 +93,15 @@
<Reference Include="System.Data.SQLite.Linq">
<HintPath>..\packages\System.Data.SQLite.x86.1.0.88.0\lib\net45\System.Data.SQLite.Linq.dll</HintPath>
</Reference>
<Reference Include="Mono.Data.Sqlite">
<HintPath>..\packages\ServiceStack.OrmLite.Sqlite.Mono.3.9.64\lib\net35\Mono.Data.Sqlite.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.OrmLite">
<HintPath>..\packages\ServiceStack.OrmLite.Sqlite.Mono.3.9.64\lib\net35\ServiceStack.OrmLite.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.OrmLite.Sqlite">
<HintPath>..\packages\ServiceStack.OrmLite.Sqlite.Mono.3.9.64\lib\net35\ServiceStack.OrmLite.Sqlite.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\SharedVersion.cs">
@ -253,6 +258,7 @@
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="sqlite3.dll" />
</ItemGroup>
<ItemGroup>
<Content Include="swagger-ui\css\hightlight.default.css">

@ -1,7 +1,11 @@
using MediaBrowser.Model.Logging;
using System;
using System.Data;
#if __MonoCS__
using Mono.Data.Sqlite;
#else
using System.Data.SQLite;
#endif
using System.IO;
using System.Threading.Tasks;
@ -133,6 +137,18 @@ namespace MediaBrowser.Server.Implementations.Persistence
throw new ArgumentNullException("dbPath");
}
#if __MonoCS__
var connectionstr = new SqliteConnectionStringBuilder
{
PageSize = 4096,
CacheSize = 4096,
SyncMode = SynchronizationModes.Normal,
DataSource = dbPath,
JournalMode = SQLiteJournalModeEnum.Off
};
var connection = new SqliteConnection(connectionstr.ConnectionString);
#else
var connectionstr = new SQLiteConnectionStringBuilder
{
PageSize = 4096,
@ -143,7 +159,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
};
var connection = new SQLiteConnection(connectionstr.ConnectionString);
#endif
await connection.OpenAsync().ConfigureAwait(false);
return connection;

@ -9,6 +9,7 @@
<package id="ServiceStack" version="3.9.62" targetFramework="net45" />
<package id="ServiceStack.Api.Swagger" version="3.9.59" targetFramework="net45" />
<package id="ServiceStack.Common" version="3.9.62" targetFramework="net45" />
<package id="ServiceStack.OrmLite.Sqlite.Mono" version="3.9.64" targetFramework="net45" />
<package id="ServiceStack.OrmLite.Sqlite32" version="3.9.63" targetFramework="net45" />
<package id="ServiceStack.OrmLite.SqlServer" version="3.9.43" targetFramework="net45" />
<package id="ServiceStack.Redis" version="3.9.43" targetFramework="net45" />

@ -161,7 +161,11 @@ namespace MediaBrowser.WebDashboard.Api
/// <returns>System.String.</returns>
private string GetDashboardResourcePath(string virtualPath)
{
return Path.Combine(DashboardUIPath, virtualPath.Replace('/', '\\'));
#if __MonoCS__
return Path.Combine(DashboardUIPath, virtualPath);
#else
return Path.Combine(DashboardUIPath, virtualPath.Replace('/', '\\'));
#endif
}
/// <summary>

Loading…
Cancel
Save