isolated sqlite dependancy

pull/702/head
LukePulverenti 12 years ago
parent 509156cbc3
commit a5f9dc1bfc

@ -815,8 +815,8 @@ var ApiClient = {
}
// Don't put these on the query string
options.type = null;
options.index = null;
delete options.type;
delete options.index;
return ApiClient.getUrl(url, options);
},
@ -849,8 +849,8 @@ var ApiClient = {
}
// Don't put these on the query string
options.type = null;
options.index = null;
delete options.type;
delete options.index;
return ApiClient.getUrl(url, options);
},
@ -883,8 +883,8 @@ var ApiClient = {
}
// Don't put these on the query string
options.type = null;
options.index = null;
delete options.type;
delete options.index;
return ApiClient.getUrl(url, options);
},
@ -917,8 +917,8 @@ var ApiClient = {
}
// Don't put these on the query string
options.type = null;
options.index = null;
delete options.type;
delete options.index;
return ApiClient.getUrl(url, options);
},
@ -951,8 +951,8 @@ var ApiClient = {
}
// Don't put these on the query string
options.type = null;
options.index = null;
delete options.type;
delete options.index;
return ApiClient.getUrl(url, options);
},
@ -987,8 +987,8 @@ var ApiClient = {
}
// Don't put these on the query string
options.type = null;
options.index = null;
delete options.type;
delete options.index;
return ApiClient.getUrl(url, options);
},

@ -116,7 +116,7 @@ namespace MediaBrowser.Common.Kernel
/// <param name="newVersion">The new version.</param>
public void OnApplicationUpdated(Version newVersion)
{
EventHelper.QueueEventIfNotNull(ApplicationUpdated, this, new GenericEventArgs<Version> {Argument = newVersion});
EventHelper.QueueEventIfNotNull(ApplicationUpdated, this, new GenericEventArgs<Version> { Argument = newVersion });
NotifyPendingRestart();
}
@ -258,7 +258,7 @@ namespace MediaBrowser.Common.Kernel
/// <value>The rest services.</value>
[ImportMany(typeof(IRestfulService))]
public IEnumerable<IRestfulService> RestServices { get; private set; }
/// <summary>
/// The _protobuf serializer initialized
/// </summary>
@ -348,14 +348,20 @@ namespace MediaBrowser.Common.Kernel
public Assembly[] Assemblies { get; private set; }
/// <summary>
/// Initializes the Kernel
/// Initializes a new instance of the <see cref="BaseKernel{TApplicationPathsType}" /> class.
/// </summary>
/// <param name="isoManager">The iso manager.</param>
/// <returns>Task.</returns>
public async Task Init(IIsoManager isoManager)
protected BaseKernel(IIsoManager isoManager)
{
IsoManager = isoManager;
}
/// <summary>
/// Initializes the Kernel
/// </summary>
/// <returns>Task.</returns>
public async Task Init()
{
Logger = Logging.LogManager.GetLogger(GetType().Name);
ApplicationPaths = new TApplicationPathsType();
@ -539,10 +545,10 @@ namespace MediaBrowser.Common.Kernel
{
yield return pluginAssembly;
}
// Include composable parts in the Model assembly
yield return typeof (SystemInfo).Assembly;
yield return typeof(SystemInfo).Assembly;
// Include composable parts in the Common assembly
yield return Assembly.GetExecutingAssembly();
@ -636,7 +642,7 @@ namespace MediaBrowser.Common.Kernel
IsoManager = null;
}
}
/// <summary>
/// Disposes the TCP manager.
/// </summary>
@ -760,7 +766,7 @@ namespace MediaBrowser.Common.Kernel
/// The _save lock
/// </summary>
private readonly object _configurationSaveLock = new object();
/// <summary>
/// Saves the current configuration
/// </summary>

@ -51,7 +51,7 @@ namespace MediaBrowser.Common.Kernel
/// Inits this instance.
/// </summary>
/// <returns>Task.</returns>
Task Init(IIsoManager isoManager);
Task Init();
/// <summary>
/// Reloads this instance.

@ -1,5 +1,4 @@
using MediaBrowser.Common.IO;
using MediaBrowser.Common.Kernel;
using MediaBrowser.Common.Kernel;
using MediaBrowser.Common.Logging;
using MediaBrowser.Common.Updates;
using MediaBrowser.Model.Logging;
@ -9,7 +8,6 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Deployment.Application;
using System.Net.Cache;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
@ -83,13 +81,6 @@ namespace MediaBrowser.Common.UI
/// <value>The logger.</value>
protected ILogger Logger { get; set; }
/// <summary>
/// Instantiates the iso manager.
/// </summary>
/// <param name="kernel">The kernel.</param>
/// <returns>IIsoManager.</returns>
protected abstract IIsoManager InstantiateIsoManager(IKernel kernel);
/// <summary>
/// Initializes a new instance of the <see cref="BaseApplication" /> class.
/// </summary>
@ -176,7 +167,7 @@ namespace MediaBrowser.Common.UI
var now = DateTime.UtcNow;
await Kernel.Init(InstantiateIsoManager(Kernel));
await Kernel.Init();
var done = (DateTime.UtcNow - now);
Logger.Info("Kernel.Init completed in {0}{1} minutes and {2} seconds.", done.Hours > 0 ? done.Hours + " Hours " : "", done.Minutes, done.Seconds);

@ -1,4 +1,5 @@
using MediaBrowser.Common.Kernel;
using MediaBrowser.Common.IO;
using MediaBrowser.Common.Kernel;
using MediaBrowser.Common.Plugins;
using MediaBrowser.Controller.Drawing;
using MediaBrowser.Controller.Entities;
@ -6,7 +7,6 @@ using MediaBrowser.Controller.IO;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.MediaInfo;
using MediaBrowser.Controller.Persistence;
using MediaBrowser.Controller.Persistence.SQLite;
using MediaBrowser.Controller.Playback;
using MediaBrowser.Controller.Plugins;
using MediaBrowser.Controller.Providers;
@ -19,10 +19,7 @@ using MediaBrowser.Model.System;
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
@ -303,8 +300,8 @@ namespace MediaBrowser.Controller
/// <summary>
/// Creates a kernel based on a Data path, which is akin to our current programdata path
/// </summary>
public Kernel()
: base()
public Kernel(IIsoManager isoManager)
: base(isoManager)
{
Instance = this;
}
@ -385,19 +382,19 @@ namespace MediaBrowser.Controller
await base.OnComposablePartsLoaded().ConfigureAwait(false);
// Get the current item repository
ItemRepository = GetRepository(ItemRepositories, Configuration.ItemRepository, SQLiteItemRepository.RepositoryName);
ItemRepository = GetRepository(ItemRepositories, Configuration.ItemRepository);
var itemRepoTask = ItemRepository.Initialize();
// Get the current user repository
UserRepository = GetRepository(UserRepositories, Configuration.UserRepository, SQLiteUserRepository.RepositoryName);
UserRepository = GetRepository(UserRepositories, Configuration.UserRepository);
var userRepoTask = UserRepository.Initialize();
// Get the current item repository
UserDataRepository = GetRepository(UserDataRepositories, Configuration.UserDataRepository, SQLiteUserDataRepository.RepositoryName);
UserDataRepository = GetRepository(UserDataRepositories, Configuration.UserDataRepository);
var userDataRepoTask = UserDataRepository.Initialize();
// Get the current display preferences repository
DisplayPreferencesRepository = GetRepository(DisplayPreferencesRepositories, Configuration.DisplayPreferencesRepository, SQLiteDisplayPreferencesRepository.RepositoryName);
DisplayPreferencesRepository = GetRepository(DisplayPreferencesRepositories, Configuration.DisplayPreferencesRepository);
var displayPreferencesRepoTask = DisplayPreferencesRepository.Initialize();
// Sort the resolvers by priority
@ -418,15 +415,14 @@ namespace MediaBrowser.Controller
/// <typeparam name="T"></typeparam>
/// <param name="repositories">The repositories.</param>
/// <param name="name">The name.</param>
/// <param name="defaultName">The default name.</param>
/// <returns>``0.</returns>
private T GetRepository<T>(IEnumerable<T> repositories, string name, string defaultName)
private T GetRepository<T>(IEnumerable<T> repositories, string name)
where T : class, IRepository
{
var enumerable = repositories as T[] ?? repositories.ToArray();
return enumerable.FirstOrDefault(r => r.Name.Equals(name ?? defaultName, StringComparison.OrdinalIgnoreCase)) ??
enumerable.First(r => r.Name.Equals(defaultName, StringComparison.OrdinalIgnoreCase));
return enumerable.FirstOrDefault(r => string.Equals(r.Name, name, StringComparison.OrdinalIgnoreCase)) ??
enumerable.FirstOrDefault();
}
/// <summary>

@ -69,14 +69,6 @@
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core" />
<Reference Include="System.Data.SQLite, Version=1.0.84.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\System.Data.SQLite.1.0.84.0\lib\net45\System.Data.SQLite.dll</HintPath>
</Reference>
<Reference Include="System.Data.SQLite.Linq, Version=1.0.84.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\System.Data.SQLite.1.0.84.0\lib\net45\System.Data.SQLite.Linq.dll</HintPath>
</Reference>
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net" />
@ -149,12 +141,6 @@
<Compile Include="Persistence\IRepository.cs" />
<Compile Include="Persistence\IUserDataRepository.cs" />
<Compile Include="Persistence\IUserRepository.cs" />
<Compile Include="Persistence\SQLite\SQLiteDisplayPreferencesRepository.cs" />
<Compile Include="Persistence\SQLite\SQLiteExtensions.cs" />
<Compile Include="Persistence\SQLite\SQLiteItemRepository.cs" />
<Compile Include="Persistence\SQLite\SQLiteRepository.cs" />
<Compile Include="Persistence\SQLite\SQLiteUserDataRepository.cs" />
<Compile Include="Persistence\SQLite\SQLiteUserRepository.cs" />
<Compile Include="Persistence\TypeMapper.cs" />
<Compile Include="Playback\BaseIntroProvider.cs" />
<Compile Include="Plugins\BaseConfigurationPage.cs" />
@ -251,12 +237,6 @@
</ItemGroup>
<ItemGroup>
<Content Include="MediaInfo\readme.txt" />
<Content Include="x64\SQLite.Interop.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="x86\SQLite.Interop.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />

@ -6,5 +6,4 @@
<package id="Rx-Core" version="2.0.21114" targetFramework="net45" />
<package id="Rx-Interfaces" version="2.0.21114" targetFramework="net45" />
<package id="Rx-Linq" version="2.0.21114" targetFramework="net45" />
<package id="System.Data.SQLite" version="1.0.84.0" targetFramework="net45" />
</packages>

@ -62,8 +62,8 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="IsoManager.cs" />
<Compile Include="IsoMount.cs" />
<Compile Include="PismoIsoManager.cs" />
<Compile Include="PismoMount.cs" />
<Compile Include="MyPfmFileMountUi.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>

@ -1,17 +1,20 @@
using MediaBrowser.Common.IO;
using MediaBrowser.Common.Kernel;
using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Common.Logging;
using MediaBrowser.Model.Logging;
namespace MediaBrowser.IsoMounter
{
/// <summary>
/// Class IsoManager
/// </summary>
public class IsoManager : BaseManager<IKernel>, IIsoManager
public class PismoIsoManager : IIsoManager
{
private ILogger Logger = LogManager.GetLogger("IsoManager");
/// <summary>
/// The mount semaphore - limit to four at a time.
/// </summary>
@ -66,12 +69,7 @@ namespace MediaBrowser.IsoMounter
/// </summary>
private bool _hasInitialized;
/// <summary>
/// Initializes a new instance of the <see cref="IsoManager" /> class.
/// </summary>
/// <param name="kernel">The kernel.</param>
public IsoManager(IKernel kernel)
: base(kernel)
public PismoIsoManager()
{
}
@ -146,14 +144,19 @@ namespace MediaBrowser.IsoMounter
throw new IOException("Unable to start mount for " + isoPath);
}
return new IsoMount(mount, isoPath, this);
return new PismoMount(mount, isoPath, this);
}
public void Dispose()
{
Dispose(true);
}
/// <summary>
/// Releases unmanaged and - optionally - managed resources.
/// </summary>
/// <param name="dispose"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
protected override void Dispose(bool dispose)
protected virtual void Dispose(bool dispose)
{
if (dispose)
{
@ -166,8 +169,6 @@ namespace MediaBrowser.IsoMounter
PfmStatic.ApiUnload();
}
}
base.Dispose(dispose);
}
/// <summary>
@ -192,7 +193,7 @@ namespace MediaBrowser.IsoMounter
/// Called when [unmount].
/// </summary>
/// <param name="mount">The mount.</param>
internal void OnUnmount(IsoMount mount)
internal void OnUnmount(PismoMount mount)
{
_mountSemaphore.Release();
}

@ -8,7 +8,7 @@ namespace MediaBrowser.IsoMounter
/// <summary>
/// Class IsoMount
/// </summary>
internal class IsoMount : IIsoMount
internal class PismoMount : IIsoMount
{
/// <summary>
/// The logger
@ -35,15 +35,15 @@ namespace MediaBrowser.IsoMounter
/// <summary>
/// The _iso manager
/// </summary>
private readonly IsoManager _isoManager;
private readonly PismoIsoManager _isoManager;
/// <summary>
/// Prevents a default instance of the <see cref="IsoMount" /> class from being created.
/// Prevents a default instance of the <see cref="PismoMount" /> class from being created.
/// </summary>
/// <param name="mount">The mount.</param>
/// <param name="isoPath">The iso path.</param>
/// <param name="isoManager">The iso manager.</param>
internal IsoMount(PfmFileMount mount, string isoPath, IsoManager isoManager)
internal PismoMount(PfmFileMount mount, string isoPath, PismoIsoManager isoManager)
{
_pfmFileMount = mount;
IsoPath = isoPath;

@ -46,7 +46,10 @@ namespace MediaBrowser.Model.DTO
[IgnoreDataMember]
public bool HasPrimaryImage
{
get { return PrimaryImageTag.HasValue; }
get
{
return PrimaryImageTag.HasValue;
}
}
/// <summary>

@ -342,7 +342,7 @@
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)\MediaBrowser.UI\" /y</PostBuildEvent>
<PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)\MediaBrowser.UI\CorePlugins\" /y</PostBuildEvent>
</PropertyGroup>
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

@ -0,0 +1,99 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{8649ED6B-8504-4D00-BFA5-B8C73CC744DB}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MediaBrowser.Server.Sqlite</RootNamespace>
<AssemblyName>MediaBrowser.Server.Sqlite</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<RunPostBuildEvent>Always</RunPostBuildEvent>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Core" />
<Reference Include="System.Data.SQLite">
<HintPath>..\packages\System.Data.SQLite.1.0.84.0\lib\net45\System.Data.SQLite.dll</HintPath>
</Reference>
<Reference Include="System.Data.SQLite.Linq">
<HintPath>..\packages\System.Data.SQLite.1.0.84.0\lib\net45\System.Data.SQLite.Linq.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SQLiteDisplayPreferencesRepository.cs" />
<Compile Include="SQLiteExtensions.cs" />
<Compile Include="SQLiteItemRepository.cs" />
<Compile Include="SQLiteRepository.cs" />
<Compile Include="SQLiteUserDataRepository.cs" />
<Compile Include="SQLiteUserRepository.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="x64\SQLite.Interop.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="x86\SQLite.Interop.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MediaBrowser.Common\MediaBrowser.Common.csproj">
<Project>{9142eefa-7570-41e1-bfcc-468bb571af2f}</Project>
<Name>MediaBrowser.Common</Name>
</ProjectReference>
<ProjectReference Include="..\MediaBrowser.Controller\MediaBrowser.Controller.csproj">
<Project>{17e1f4e6-8abd-4fe5-9ecf-43d4b6087ba2}</Project>
<Name>MediaBrowser.Controller</Name>
</ProjectReference>
<ProjectReference Include="..\MediaBrowser.Model\MediaBrowser.Model.csproj">
<Project>{7eeeb4bb-f3e8-48fc-b4c5-70f0fff8329b}</Project>
<Name>MediaBrowser.Model</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
<PropertyGroup>
<PostBuildEvent>xcopy "$(TargetPath)" "$(SolutionDir)\MediaBrowser.ServerApplication\CorePlugins\" /y</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("MediaBrowser.Server.Sqlite")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MediaBrowser.Server.Sqlite")]
[assembly: AssemblyCopyright("Copyright © 2013")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("f46c9f4b-24ed-49e1-be19-4b6242dd8382")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

@ -1,4 +1,6 @@
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Persistence;
using MediaBrowser.Model.Entities;
using System;
using System.Collections.Generic;
@ -8,7 +10,7 @@ using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Persistence.SQLite
namespace MediaBrowser.Server.Sqlite
{
/// <summary>
/// Class SQLiteDisplayPreferencesRepository

@ -2,7 +2,7 @@
using System.Data;
using System.Data.SQLite;
namespace MediaBrowser.Controller.Persistence.SQLite
namespace MediaBrowser.Server.Sqlite
{
/// <summary>
/// Class SQLiteExtensions

@ -1,5 +1,7 @@
using MediaBrowser.Common.Serialization;
using MediaBrowser.Controller;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Persistence;
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
@ -8,7 +10,7 @@ using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Persistence.SQLite
namespace MediaBrowser.Server.Sqlite
{
/// <summary>
/// Class SQLiteItemRepository

@ -9,7 +9,7 @@ using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Persistence.SQLite
namespace MediaBrowser.Server.Sqlite
{
/// <summary>
/// Class SqliteRepository

@ -1,4 +1,6 @@
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Persistence;
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
@ -7,7 +9,7 @@ using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Persistence.SQLite
namespace MediaBrowser.Server.Sqlite
{
/// <summary>
/// Class SQLiteUserDataRepository

@ -1,14 +1,16 @@
using System.Threading;
using MediaBrowser.Common.Serialization;
using MediaBrowser.Common.Serialization;
using MediaBrowser.Controller;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Persistence;
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Data;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Persistence.SQLite
namespace MediaBrowser.Server.Sqlite
{
/// <summary>
/// Class SQLiteUserRepository

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="System.Data.SQLite" version="1.0.84.0" targetFramework="net45" />
</packages>

@ -75,16 +75,6 @@ namespace MediaBrowser.ServerApplication
get { return "MediaBrowser.Server.Uninstall.exe"; }
}
/// <summary>
/// Instantiates the iso manager.
/// </summary>
/// <param name="kernel">The kernel.</param>
/// <returns>IIsoManager.</returns>
protected override IIsoManager InstantiateIsoManager(IKernel kernel)
{
return new IsoManager(kernel);
}
/// <summary>
/// Called when [second instance launched].
/// </summary>
@ -180,7 +170,7 @@ namespace MediaBrowser.ServerApplication
/// <returns>IKernel.</returns>
protected override IKernel InstantiateKernel()
{
return new Kernel();
return new Kernel(new PismoIsoManager());
}
/// <summary>

@ -320,6 +320,9 @@
<Content Include="CorePlugins\MediaBrowser.ApiInteraction.Javascript.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="CorePlugins\MediaBrowser.Server.Sqlite.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="CorePlugins\MediaBrowser.WebDashboard.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>

@ -244,7 +244,7 @@ namespace MediaBrowser.UI
/// <returns>IKernel.</returns>
protected override IKernel InstantiateKernel()
{
return new UIKernel();
return new UIKernel(new PismoIsoManager());
}
/// <summary>
@ -258,16 +258,6 @@ namespace MediaBrowser.UI
return HiddenWindow;
}
/// <summary>
/// Instantiates the iso manager.
/// </summary>
/// <param name="kernel">The kernel.</param>
/// <returns>IIsoManager.</returns>
protected override IIsoManager InstantiateIsoManager(IKernel kernel)
{
return new IsoManager(kernel);
}
/// <summary>
/// Shows the application window.
/// </summary>
@ -368,7 +358,7 @@ namespace MediaBrowser.UI
{
var now = DateTime.UtcNow;
await Kernel.Init(InstantiateIsoManager(Kernel));
await Kernel.Init();
Logger.Info("Kernel.Init completed in {0} seconds.", (DateTime.UtcNow - now).TotalSeconds);

@ -1,7 +1,5 @@
using System.Net;
using System.Net.Cache;
using System.Net.Http;
using MediaBrowser.ApiInteraction;
using MediaBrowser.ApiInteraction;
using MediaBrowser.Common.IO;
using MediaBrowser.Common.Kernel;
using MediaBrowser.Common.Logging;
using MediaBrowser.Model.Connectivity;
@ -14,6 +12,9 @@ using System.ComponentModel.Composition;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Cache;
using System.Net.Http;
using System.Reflection;
using System.Threading.Tasks;
@ -45,8 +46,8 @@ namespace MediaBrowser.UI.Controller
/// <summary>
/// Initializes a new instance of the <see cref="UIKernel" /> class.
/// </summary>
public UIKernel()
: base()
public UIKernel(IIsoManager isoManager)
: base(isoManager)
{
Instance = this;
}
@ -147,20 +148,6 @@ namespace MediaBrowser.UI.Controller
return base.ReloadInternal();
}
/// <summary>
/// Gets the composable part assemblies.
/// </summary>
/// <returns>IEnumerable{Assembly}.</returns>
protected override IEnumerable<Assembly> GetComposablePartAssemblies()
{
var runningDirectory = Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName);
return base.GetComposablePartAssemblies().Concat(new[] {
Assembly.Load(File.ReadAllBytes(Path.Combine(runningDirectory, "MediaBrowser.Plugins.DefaultTheme.dll")))
});
}
/// <summary>
/// Called when [composable parts loaded].
/// </summary>

@ -397,7 +397,7 @@
<Content Include="libvlccore.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="MediaBrowser.Plugins.DefaultTheme.dll">
<Content Include="CorePlugins\MediaBrowser.Plugins.DefaultTheme.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="plugins\3dnow\libmemcpy3dn_plugin.dll">

@ -45,6 +45,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaBrowser.Plugins.Dlna",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaBrowser.Installer", "MediaBrowser.Installer\MediaBrowser.Installer.csproj", "{3879F78A-D6F6-45E5-B2A8-D8DCF2DABB74}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MediaBrowser.Server.Sqlite", "MediaBrowser.Server.Sqlite\MediaBrowser.Server.Sqlite.csproj", "{8649ED6B-8504-4D00-BFA5-B8C73CC744DB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -287,6 +289,20 @@ Global
{3879F78A-D6F6-45E5-B2A8-D8DCF2DABB74}.Release|Win32.ActiveCfg = Release|Any CPU
{3879F78A-D6F6-45E5-B2A8-D8DCF2DABB74}.Release|x64.ActiveCfg = Release|Any CPU
{3879F78A-D6F6-45E5-B2A8-D8DCF2DABB74}.Release|x86.ActiveCfg = Release|Any CPU
{8649ED6B-8504-4D00-BFA5-B8C73CC744DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8649ED6B-8504-4D00-BFA5-B8C73CC744DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8649ED6B-8504-4D00-BFA5-B8C73CC744DB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{8649ED6B-8504-4D00-BFA5-B8C73CC744DB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{8649ED6B-8504-4D00-BFA5-B8C73CC744DB}.Debug|Win32.ActiveCfg = Debug|Any CPU
{8649ED6B-8504-4D00-BFA5-B8C73CC744DB}.Debug|x64.ActiveCfg = Debug|Any CPU
{8649ED6B-8504-4D00-BFA5-B8C73CC744DB}.Debug|x86.ActiveCfg = Debug|Any CPU
{8649ED6B-8504-4D00-BFA5-B8C73CC744DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8649ED6B-8504-4D00-BFA5-B8C73CC744DB}.Release|Any CPU.Build.0 = Release|Any CPU
{8649ED6B-8504-4D00-BFA5-B8C73CC744DB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{8649ED6B-8504-4D00-BFA5-B8C73CC744DB}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{8649ED6B-8504-4D00-BFA5-B8C73CC744DB}.Release|Win32.ActiveCfg = Release|Any CPU
{8649ED6B-8504-4D00-BFA5-B8C73CC744DB}.Release|x64.ActiveCfg = Release|Any CPU
{8649ED6B-8504-4D00-BFA5-B8C73CC744DB}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

Loading…
Cancel
Save