mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 18:08:53 -07:00
update components
This commit is contained in:
parent
f6acc5fbff
commit
89ff1f2af6
@ -62,11 +62,6 @@
|
|||||||
<Compile Include="TSStreamFile.cs" />
|
<Compile Include="TSStreamFile.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
|
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
|
||||||
<PropertyGroup>
|
|
||||||
<PostBuildEvent>if $(ConfigurationName) == Release (
|
|
||||||
xcopy "$(TargetPath)" "$(SolutionDir)\Nuget\dlls\" /y /d /r /i
|
|
||||||
)</PostBuildEvent>
|
|
||||||
</PropertyGroup>
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- 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.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
|
@ -61,11 +61,6 @@
|
|||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
|
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
|
||||||
<PropertyGroup>
|
|
||||||
<PostBuildEvent>if $(ConfigurationName) == Release (
|
|
||||||
xcopy "$(TargetPath)" "$(SolutionDir)\Nuget\dlls\" /y /d /r /i
|
|
||||||
)</PostBuildEvent>
|
|
||||||
</PropertyGroup>
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- 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.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
using MediaBrowser.Common.Configuration;
|
using MediaBrowser.Common.Configuration;
|
||||||
using MediaBrowser.Common.Events;
|
using MediaBrowser.Common.Events;
|
||||||
using MediaBrowser.Common.Implementations.Archiving;
|
|
||||||
using MediaBrowser.Common.Implementations.Devices;
|
using MediaBrowser.Common.Implementations.Devices;
|
||||||
using MediaBrowser.Common.Implementations.IO;
|
using MediaBrowser.Common.Implementations.IO;
|
||||||
using MediaBrowser.Common.Implementations.ScheduledTasks;
|
using MediaBrowser.Common.Implementations.ScheduledTasks;
|
||||||
@ -158,12 +157,6 @@ namespace MediaBrowser.Common.Implementations
|
|||||||
|
|
||||||
protected IFileSystem FileSystemManager { get; private set; }
|
protected IFileSystem FileSystemManager { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the zip client.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The zip client.</value>
|
|
||||||
protected IZipClient ZipClient { get; private set; }
|
|
||||||
|
|
||||||
protected IIsoManager IsoManager { get; private set; }
|
protected IIsoManager IsoManager { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -243,14 +236,7 @@ namespace MediaBrowser.Common.Implementations
|
|||||||
|
|
||||||
JsonSerializer = CreateJsonSerializer();
|
JsonSerializer = CreateJsonSerializer();
|
||||||
|
|
||||||
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
|
MemoryStreamProvider = CreateMemoryStreamProvider();
|
||||||
{
|
|
||||||
MemoryStreamProvider = new RecyclableMemoryStreamProvider();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MemoryStreamProvider = new MemoryStreamProvider();
|
|
||||||
}
|
|
||||||
|
|
||||||
OnLoggerLoaded(true);
|
OnLoggerLoaded(true);
|
||||||
LogManager.LoggerLoaded += (s, e) => OnLoggerLoaded(false);
|
LogManager.LoggerLoaded += (s, e) => OnLoggerLoaded(false);
|
||||||
@ -283,6 +269,8 @@ namespace MediaBrowser.Common.Implementations
|
|||||||
progress.Report(100);
|
progress.Report(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected abstract IMemoryStreamProvider CreateMemoryStreamProvider();
|
||||||
|
|
||||||
protected virtual void OnLoggerLoaded(bool isFirstLoad)
|
protected virtual void OnLoggerLoaded(bool isFirstLoad)
|
||||||
{
|
{
|
||||||
Logger.Info("Application version: {0}", ApplicationVersion);
|
Logger.Info("Application version: {0}", ApplicationVersion);
|
||||||
@ -531,9 +519,6 @@ namespace MediaBrowser.Common.Implementations
|
|||||||
InstallationManager = new InstallationManager(LogManager.GetLogger("InstallationManager"), this, ApplicationPaths, HttpClient, JsonSerializer, SecurityManager, ConfigurationManager, FileSystemManager);
|
InstallationManager = new InstallationManager(LogManager.GetLogger("InstallationManager"), this, ApplicationPaths, HttpClient, JsonSerializer, SecurityManager, ConfigurationManager, FileSystemManager);
|
||||||
RegisterSingleInstance(InstallationManager);
|
RegisterSingleInstance(InstallationManager);
|
||||||
|
|
||||||
ZipClient = new ZipClient(FileSystemManager);
|
|
||||||
RegisterSingleInstance(ZipClient);
|
|
||||||
|
|
||||||
IsoManager = new IsoManager();
|
IsoManager = new IsoManager();
|
||||||
RegisterSingleInstance(IsoManager);
|
RegisterSingleInstance(IsoManager);
|
||||||
|
|
||||||
|
@ -45,30 +45,21 @@
|
|||||||
<RunPostBuildEvent>Always</RunPostBuildEvent>
|
<RunPostBuildEvent>Always</RunPostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.IO.RecyclableMemoryStream, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Microsoft.IO.RecyclableMemoryStream.1.1.0.0\lib\net45\Microsoft.IO.RecyclableMemoryStream.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.4.3.8\lib\net45\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.3.10\lib\net45\NLog.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Patterns.Logging">
|
<Reference Include="Patterns.Logging">
|
||||||
<HintPath>..\packages\Patterns.Logging.1.0.0.2\lib\portable-net45+sl4+wp71+win8+wpa81\Patterns.Logging.dll</HintPath>
|
<HintPath>..\packages\Patterns.Logging.1.0.0.2\lib\portable-net45+sl4+wp71+win8+wpa81\Patterns.Logging.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SharpCompress, Version=0.10.2.0, Culture=neutral, PublicKeyToken=beaf6f427e128133, processorArchitecture=MSIL">
|
<Reference Include="SimpleInjector, Version=3.2.4.0, Culture=neutral, PublicKeyToken=984cb50dea722e99, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<HintPath>..\packages\SimpleInjector.3.2.4\lib\net45\SimpleInjector.dll</HintPath>
|
||||||
<HintPath>..\ThirdParty\SharpCompress\SharpCompress.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="SimpleInjector, Version=3.2.2.0, Culture=neutral, PublicKeyToken=984cb50dea722e99, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\SimpleInjector.3.2.2\lib\net45\SimpleInjector.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Net" />
|
<Reference Include="System.Net" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="ServiceStack.Text">
|
<Reference Include="ServiceStack.Text">
|
||||||
@ -79,7 +70,6 @@
|
|||||||
<Compile Include="..\SharedVersion.cs">
|
<Compile Include="..\SharedVersion.cs">
|
||||||
<Link>Properties\SharedVersion.cs</Link>
|
<Link>Properties\SharedVersion.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Archiving\ZipClient.cs" />
|
|
||||||
<Compile Include="BaseApplicationHost.cs" />
|
<Compile Include="BaseApplicationHost.cs" />
|
||||||
<Compile Include="BaseApplicationPaths.cs" />
|
<Compile Include="BaseApplicationPaths.cs" />
|
||||||
<Compile Include="Configuration\BaseConfigurationManager.cs" />
|
<Compile Include="Configuration\BaseConfigurationManager.cs" />
|
||||||
@ -91,7 +81,6 @@
|
|||||||
<Compile Include="IO\IsoManager.cs" />
|
<Compile Include="IO\IsoManager.cs" />
|
||||||
<Compile Include="IO\LnkShortcutHandler.cs" />
|
<Compile Include="IO\LnkShortcutHandler.cs" />
|
||||||
<Compile Include="IO\ManagedFileSystem.cs" />
|
<Compile Include="IO\ManagedFileSystem.cs" />
|
||||||
<Compile Include="IO\MemoryStreamProvider.cs" />
|
|
||||||
<Compile Include="IO\WindowsFileSystem.cs" />
|
<Compile Include="IO\WindowsFileSystem.cs" />
|
||||||
<Compile Include="Logging\LogHelper.cs" />
|
<Compile Include="Logging\LogHelper.cs" />
|
||||||
<Compile Include="Logging\NLogger.cs" />
|
<Compile Include="Logging\NLogger.cs" />
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<packages>
|
<packages>
|
||||||
<package id="Microsoft.IO.RecyclableMemoryStream" version="1.1.0.0" targetFramework="net45" />
|
<package id="NLog" version="4.3.10" targetFramework="net46" />
|
||||||
<package id="NLog" version="4.3.8" targetFramework="net45" />
|
|
||||||
<package id="Patterns.Logging" version="1.0.0.2" targetFramework="net45" />
|
<package id="Patterns.Logging" version="1.0.0.2" targetFramework="net45" />
|
||||||
<package id="SimpleInjector" version="3.2.2" targetFramework="net45" />
|
<package id="SimpleInjector" version="3.2.4" targetFramework="net46" />
|
||||||
</packages>
|
</packages>
|
@ -39,8 +39,8 @@
|
|||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Rssdp.NetFx40">
|
<Reference Include="Rssdp.Native">
|
||||||
<HintPath>..\ThirdParty\rssdp\Rssdp.NetFx40.dll</HintPath>
|
<HintPath>..\ThirdParty\rssdp\Rssdp.Native.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Rssdp.Portable">
|
<Reference Include="Rssdp.Portable">
|
||||||
<HintPath>..\ThirdParty\rssdp\Rssdp.Portable.dll</HintPath>
|
<HintPath>..\ThirdParty\rssdp\Rssdp.Portable.dll</HintPath>
|
||||||
|
@ -26,7 +26,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
return new Tuple<List<string>, List<string>>(decoders, encoders);
|
return new Tuple<List<string>, List<string>>(decoders, encoders);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool ValidateVersion(string encoderAppPath)
|
public bool ValidateVersion(string encoderAppPath, bool logOutput)
|
||||||
{
|
{
|
||||||
string output = string.Empty;
|
string output = string.Empty;
|
||||||
try
|
try
|
||||||
@ -37,6 +37,11 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (logOutput)
|
||||||
|
{
|
||||||
|
_logger.Info("ffmpeg info: {0}", output ?? string.Empty);
|
||||||
|
}
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(output))
|
if (string.IsNullOrWhiteSpace(output))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@ -241,7 +241,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
|
|
||||||
path = newPaths.Item1;
|
path = newPaths.Item1;
|
||||||
|
|
||||||
if (!ValidateVersion(path))
|
if (!ValidateVersion(path, true))
|
||||||
{
|
{
|
||||||
throw new ResourceNotFoundException("ffmpeg version 3.0 or greater is required.");
|
throw new ResourceNotFoundException("ffmpeg version 3.0 or greater is required.");
|
||||||
}
|
}
|
||||||
@ -253,9 +253,9 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
Init();
|
Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool ValidateVersion(string path)
|
private bool ValidateVersion(string path, bool logOutput)
|
||||||
{
|
{
|
||||||
return new EncoderValidator(_logger).ValidateVersion(path);
|
return new EncoderValidator(_logger).ValidateVersion(path, logOutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ConfigureEncoderPaths()
|
private void ConfigureEncoderPaths()
|
||||||
@ -307,7 +307,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
string encoderPath = null;
|
string encoderPath = null;
|
||||||
string probePath = null;
|
string probePath = null;
|
||||||
|
|
||||||
if (_hasExternalEncoder && ValidateVersion(_originalFFMpegPath))
|
if (_hasExternalEncoder && ValidateVersion(_originalFFMpegPath, true))
|
||||||
{
|
{
|
||||||
encoderPath = _originalFFMpegPath;
|
encoderPath = _originalFFMpegPath;
|
||||||
probePath = _originalFFProbePath;
|
probePath = _originalFFProbePath;
|
||||||
@ -315,7 +315,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(encoderPath))
|
if (string.IsNullOrWhiteSpace(encoderPath))
|
||||||
{
|
{
|
||||||
if (ValidateVersion("ffmpeg") && ValidateVersion("ffprobe"))
|
if (ValidateVersion("ffmpeg", true) && ValidateVersion("ffprobe", false))
|
||||||
{
|
{
|
||||||
encoderPath = "ffmpeg";
|
encoderPath = "ffmpeg";
|
||||||
probePath = "ffprobe";
|
probePath = "ffprobe";
|
||||||
|
@ -160,5 +160,17 @@ namespace MediaBrowser.Model.Services
|
|||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string GetQueryStringValue(NameValuePair pair)
|
||||||
|
{
|
||||||
|
return pair.Name + "=" + pair.Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override String ToString()
|
||||||
|
{
|
||||||
|
var vals = this.Select(GetQueryStringValue).ToArray();
|
||||||
|
|
||||||
|
return string.Join("&", vals);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
using MediaBrowser.Model.IO;
|
using System.IO;
|
||||||
|
using MediaBrowser.Model.IO;
|
||||||
using SharpCompress.Archive.Rar;
|
using SharpCompress.Archive.Rar;
|
||||||
using SharpCompress.Archive.SevenZip;
|
using SharpCompress.Archive.SevenZip;
|
||||||
using SharpCompress.Archive.Tar;
|
using SharpCompress.Archive.Tar;
|
||||||
using SharpCompress.Common;
|
using SharpCompress.Common;
|
||||||
using SharpCompress.Reader;
|
using SharpCompress.Reader;
|
||||||
using SharpCompress.Reader.Zip;
|
using SharpCompress.Reader.Zip;
|
||||||
using System.IO;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Common.Implementations.Archiving
|
namespace MediaBrowser.Server.Implementations.Archiving
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class DotNetZipClient
|
/// Class DotNetZipClient
|
@ -1,9 +1,8 @@
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using MediaBrowser.Common.IO;
|
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
using Microsoft.IO;
|
using Microsoft.IO;
|
||||||
|
|
||||||
namespace MediaBrowser.Common.Implementations.IO
|
namespace MediaBrowser.Server.Implementations.IO
|
||||||
{
|
{
|
||||||
public class RecyclableMemoryStreamProvider : IMemoryStreamProvider
|
public class RecyclableMemoryStreamProvider : IMemoryStreamProvider
|
||||||
{
|
{
|
@ -205,7 +205,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
|
|||||||
|
|
||||||
private bool EncodeVideo(MediaSourceInfo mediaSource)
|
private bool EncodeVideo(MediaSourceInfo mediaSource)
|
||||||
{
|
{
|
||||||
if (_liveTvOptions.EnableOriginalAudioWithEncodedRecordings)
|
if (_liveTvOptions.EnableOriginalVideoWithEncodedRecordings)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -57,14 +57,22 @@
|
|||||||
<HintPath>..\packages\MediaBrowser.Naming.1.0.0.55\lib\portable-net45+sl4+wp71+win8+wpa81\MediaBrowser.Naming.dll</HintPath>
|
<HintPath>..\packages\MediaBrowser.Naming.1.0.0.55\lib\portable-net45+sl4+wp71+win8+wpa81\MediaBrowser.Naming.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.IO.RecyclableMemoryStream, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\Microsoft.IO.RecyclableMemoryStream.1.1.0.0\lib\net45\Microsoft.IO.RecyclableMemoryStream.dll</HintPath>
|
||||||
|
<Private>True</Private>
|
||||||
|
</Reference>
|
||||||
<Reference Include="Patterns.Logging">
|
<Reference Include="Patterns.Logging">
|
||||||
<HintPath>..\packages\Patterns.Logging.1.0.0.2\lib\portable-net45+sl4+wp71+win8+wpa81\Patterns.Logging.dll</HintPath>
|
<HintPath>..\packages\Patterns.Logging.1.0.0.2\lib\portable-net45+sl4+wp71+win8+wpa81\Patterns.Logging.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="ServiceStack.Api.Swagger">
|
<Reference Include="ServiceStack.Api.Swagger">
|
||||||
<HintPath>..\ThirdParty\ServiceStack\ServiceStack.Api.Swagger.dll</HintPath>
|
<HintPath>..\ThirdParty\ServiceStack\ServiceStack.Api.Swagger.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SimpleInjector, Version=3.2.2.0, Culture=neutral, PublicKeyToken=984cb50dea722e99, processorArchitecture=MSIL">
|
<Reference Include="SharpCompress, Version=0.10.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\SimpleInjector.3.2.2\lib\net45\SimpleInjector.dll</HintPath>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
|
<HintPath>..\ThirdParty\SharpCompress\SharpCompress.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="SimpleInjector, Version=3.2.4.0, Culture=neutral, PublicKeyToken=984cb50dea722e99, processorArchitecture=MSIL">
|
||||||
|
<HintPath>..\packages\SimpleInjector.3.2.4\lib\net45\SimpleInjector.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SocketHttpListener, Version=1.0.6109.26162, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="SocketHttpListener, Version=1.0.6109.26162, Culture=neutral, processorArchitecture=MSIL">
|
||||||
@ -103,6 +111,7 @@
|
|||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Activity\ActivityManager.cs" />
|
<Compile Include="Activity\ActivityManager.cs" />
|
||||||
<Compile Include="Activity\ActivityRepository.cs" />
|
<Compile Include="Activity\ActivityRepository.cs" />
|
||||||
|
<Compile Include="Archiving\ZipClient.cs" />
|
||||||
<Compile Include="Branding\BrandingConfigurationFactory.cs" />
|
<Compile Include="Branding\BrandingConfigurationFactory.cs" />
|
||||||
<Compile Include="Channels\ChannelConfigurations.cs" />
|
<Compile Include="Channels\ChannelConfigurations.cs" />
|
||||||
<Compile Include="Channels\ChannelDynamicMediaSourceProvider.cs" />
|
<Compile Include="Channels\ChannelDynamicMediaSourceProvider.cs" />
|
||||||
@ -170,6 +179,7 @@
|
|||||||
<Compile Include="Intros\DefaultIntroProvider.cs" />
|
<Compile Include="Intros\DefaultIntroProvider.cs" />
|
||||||
<Compile Include="IO\FileRefresher.cs" />
|
<Compile Include="IO\FileRefresher.cs" />
|
||||||
<Compile Include="IO\LibraryMonitor.cs" />
|
<Compile Include="IO\LibraryMonitor.cs" />
|
||||||
|
<Compile Include="IO\MemoryStreamProvider.cs" />
|
||||||
<Compile Include="IO\ThrottledStream.cs" />
|
<Compile Include="IO\ThrottledStream.cs" />
|
||||||
<Compile Include="Library\CoreResolutionIgnoreRule.cs" />
|
<Compile Include="Library\CoreResolutionIgnoreRule.cs" />
|
||||||
<Compile Include="Library\LibraryManager.cs" />
|
<Compile Include="Library\LibraryManager.cs" />
|
||||||
|
@ -87,9 +87,6 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||||||
private IDbCommand _deleteAncestorsCommand;
|
private IDbCommand _deleteAncestorsCommand;
|
||||||
private IDbCommand _saveAncestorCommand;
|
private IDbCommand _saveAncestorCommand;
|
||||||
|
|
||||||
private IDbCommand _deleteUserDataKeysCommand;
|
|
||||||
private IDbCommand _saveUserDataKeysCommand;
|
|
||||||
|
|
||||||
private IDbCommand _deleteItemValuesCommand;
|
private IDbCommand _deleteItemValuesCommand;
|
||||||
private IDbCommand _saveItemValuesCommand;
|
private IDbCommand _saveItemValuesCommand;
|
||||||
|
|
||||||
@ -169,8 +166,6 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||||||
"create index if not exists idx_AncestorIds1 on AncestorIds(AncestorId)",
|
"create index if not exists idx_AncestorIds1 on AncestorIds(AncestorId)",
|
||||||
"create index if not exists idx_AncestorIds2 on AncestorIds(AncestorIdText)",
|
"create index if not exists idx_AncestorIds2 on AncestorIds(AncestorIdText)",
|
||||||
|
|
||||||
"create table if not exists UserDataKeys (ItemId GUID, UserDataKey TEXT Priority INT, PRIMARY KEY (ItemId, UserDataKey))",
|
|
||||||
|
|
||||||
"create table if not exists ItemValues (ItemId GUID, Type INT, Value TEXT, CleanValue TEXT)",
|
"create table if not exists ItemValues (ItemId GUID, Type INT, Value TEXT, CleanValue TEXT)",
|
||||||
|
|
||||||
"create table if not exists ProviderIds (ItemId GUID, Name TEXT, Value TEXT, PRIMARY KEY (ItemId, Name))",
|
"create table if not exists ProviderIds (ItemId GUID, Name TEXT, Value TEXT, PRIMARY KEY (ItemId, Name))",
|
||||||
@ -192,6 +187,8 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||||||
|
|
||||||
"create index if not exists idx_mediastreams1 on mediastreams(ItemId)",
|
"create index if not exists idx_mediastreams1 on mediastreams(ItemId)",
|
||||||
|
|
||||||
|
//"drop table if exists UserDataKeys"
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_connection.RunQueries(queries, Logger);
|
_connection.RunQueries(queries, Logger);
|
||||||
@ -289,7 +286,6 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||||||
_connection.AddColumn(Logger, "TypedBaseItems", "ThemeSongIds", "Text");
|
_connection.AddColumn(Logger, "TypedBaseItems", "ThemeSongIds", "Text");
|
||||||
_connection.AddColumn(Logger, "TypedBaseItems", "ThemeVideoIds", "Text");
|
_connection.AddColumn(Logger, "TypedBaseItems", "ThemeVideoIds", "Text");
|
||||||
|
|
||||||
_connection.AddColumn(Logger, "UserDataKeys", "Priority", "INT");
|
|
||||||
_connection.AddColumn(Logger, "ItemValues", "CleanValue", "Text");
|
_connection.AddColumn(Logger, "ItemValues", "CleanValue", "Text");
|
||||||
|
|
||||||
_connection.AddColumn(Logger, ChaptersTableName, "ImageDateModified", "DATETIME");
|
_connection.AddColumn(Logger, ChaptersTableName, "ImageDateModified", "DATETIME");
|
||||||
@ -316,6 +312,8 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||||||
"drop index if exists idx_ItemValues3",
|
"drop index if exists idx_ItemValues3",
|
||||||
"drop index if exists idx_ItemValues4",
|
"drop index if exists idx_ItemValues4",
|
||||||
"drop index if exists idx_ItemValues5",
|
"drop index if exists idx_ItemValues5",
|
||||||
|
"drop index if exists idx_UserDataKeys3",
|
||||||
|
"drop table if exists UserDataKeys",
|
||||||
|
|
||||||
"create index if not exists idx_PathTypedBaseItems on TypedBaseItems(Path)",
|
"create index if not exists idx_PathTypedBaseItems on TypedBaseItems(Path)",
|
||||||
"create index if not exists idx_ParentIdTypedBaseItems on TypedBaseItems(ParentId)",
|
"create index if not exists idx_ParentIdTypedBaseItems on TypedBaseItems(ParentId)",
|
||||||
@ -347,10 +345,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||||||
|
|
||||||
// items by name
|
// items by name
|
||||||
"create index if not exists idx_ItemValues6 on ItemValues(ItemId,Type,CleanValue)",
|
"create index if not exists idx_ItemValues6 on ItemValues(ItemId,Type,CleanValue)",
|
||||||
"create index if not exists idx_ItemValues7 on ItemValues(Type,CleanValue,ItemId)",
|
"create index if not exists idx_ItemValues7 on ItemValues(Type,CleanValue,ItemId)"
|
||||||
|
|
||||||
// covering index
|
|
||||||
"create index if not exists idx_UserDataKeys3 on UserDataKeys(ItemId,Priority,UserDataKey)"
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_connection.RunQueries(postQueries, Logger);
|
_connection.RunQueries(postQueries, Logger);
|
||||||
@ -653,17 +648,6 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||||||
_updateInheritedTagsCommand.Parameters.Add(_updateInheritedTagsCommand, "@Guid");
|
_updateInheritedTagsCommand.Parameters.Add(_updateInheritedTagsCommand, "@Guid");
|
||||||
_updateInheritedTagsCommand.Parameters.Add(_updateInheritedTagsCommand, "@InheritedTags");
|
_updateInheritedTagsCommand.Parameters.Add(_updateInheritedTagsCommand, "@InheritedTags");
|
||||||
|
|
||||||
// user data
|
|
||||||
_deleteUserDataKeysCommand = _connection.CreateCommand();
|
|
||||||
_deleteUserDataKeysCommand.CommandText = "delete from UserDataKeys where ItemId=@Id";
|
|
||||||
_deleteUserDataKeysCommand.Parameters.Add(_deleteUserDataKeysCommand, "@Id");
|
|
||||||
|
|
||||||
_saveUserDataKeysCommand = _connection.CreateCommand();
|
|
||||||
_saveUserDataKeysCommand.CommandText = "insert into UserDataKeys (ItemId, UserDataKey, Priority) values (@ItemId, @UserDataKey, @Priority)";
|
|
||||||
_saveUserDataKeysCommand.Parameters.Add(_saveUserDataKeysCommand, "@ItemId");
|
|
||||||
_saveUserDataKeysCommand.Parameters.Add(_saveUserDataKeysCommand, "@UserDataKey");
|
|
||||||
_saveUserDataKeysCommand.Parameters.Add(_saveUserDataKeysCommand, "@Priority");
|
|
||||||
|
|
||||||
// item values
|
// item values
|
||||||
_deleteItemValuesCommand = _connection.CreateCommand();
|
_deleteItemValuesCommand = _connection.CreateCommand();
|
||||||
_deleteItemValuesCommand.CommandText = "delete from ItemValues where ItemId=@Id";
|
_deleteItemValuesCommand.CommandText = "delete from ItemValues where ItemId=@Id";
|
||||||
@ -1071,7 +1055,6 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||||||
UpdateAncestors(item.Id, item.GetAncestorIds().Distinct().ToList(), transaction);
|
UpdateAncestors(item.Id, item.GetAncestorIds().Distinct().ToList(), transaction);
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateUserDataKeys(item.Id, item.GetUserDataKeys().Distinct(StringComparer.OrdinalIgnoreCase).ToList(), transaction);
|
|
||||||
UpdateImages(item.Id, item.ImageInfos, transaction);
|
UpdateImages(item.Id, item.ImageInfos, transaction);
|
||||||
UpdateProviderIds(item.Id, item.ProviderIds, transaction);
|
UpdateProviderIds(item.Id, item.ProviderIds, transaction);
|
||||||
UpdateItemValues(item.Id, GetItemValuesToSave(item), transaction);
|
UpdateItemValues(item.Id, GetItemValuesToSave(item), transaction);
|
||||||
@ -2343,14 +2326,9 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||||||
return string.Empty;
|
return string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_config.Configuration.SchemaVersion >= 96)
|
|
||||||
{
|
|
||||||
return " left join UserDataDb.UserData on UserDataKey=UserDataDb.UserData.Key And (UserId=@UserId)";
|
return " left join UserDataDb.UserData on UserDataKey=UserDataDb.UserData.Key And (UserId=@UserId)";
|
||||||
}
|
}
|
||||||
|
|
||||||
return " left join UserDataDb.UserData on (select UserDataKey from UserDataKeys where ItemId=Guid order by Priority LIMIT 1)=UserDataDb.UserData.Key And (UserId=@UserId)";
|
|
||||||
}
|
|
||||||
|
|
||||||
private string GetGroupBy(InternalItemsQuery query)
|
private string GetGroupBy(InternalItemsQuery query)
|
||||||
{
|
{
|
||||||
var groups = new List<string>();
|
var groups = new List<string>();
|
||||||
@ -4176,11 +4154,6 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||||||
_deleteAncestorsCommand.Transaction = transaction;
|
_deleteAncestorsCommand.Transaction = transaction;
|
||||||
_deleteAncestorsCommand.ExecuteNonQuery();
|
_deleteAncestorsCommand.ExecuteNonQuery();
|
||||||
|
|
||||||
// Delete user data keys
|
|
||||||
_deleteUserDataKeysCommand.GetParameter(0).Value = id;
|
|
||||||
_deleteUserDataKeysCommand.Transaction = transaction;
|
|
||||||
_deleteUserDataKeysCommand.ExecuteNonQuery();
|
|
||||||
|
|
||||||
// Delete item values
|
// Delete item values
|
||||||
_deleteItemValuesCommand.GetParameter(0).Value = id;
|
_deleteItemValuesCommand.GetParameter(0).Value = id;
|
||||||
_deleteItemValuesCommand.Transaction = transaction;
|
_deleteItemValuesCommand.Transaction = transaction;
|
||||||
@ -4949,39 +4922,6 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateUserDataKeys(Guid itemId, List<string> keys, IDbTransaction transaction)
|
|
||||||
{
|
|
||||||
if (itemId == Guid.Empty)
|
|
||||||
{
|
|
||||||
throw new ArgumentNullException("itemId");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (keys == null)
|
|
||||||
{
|
|
||||||
throw new ArgumentNullException("keys");
|
|
||||||
}
|
|
||||||
|
|
||||||
CheckDisposed();
|
|
||||||
|
|
||||||
// First delete
|
|
||||||
_deleteUserDataKeysCommand.GetParameter(0).Value = itemId;
|
|
||||||
_deleteUserDataKeysCommand.Transaction = transaction;
|
|
||||||
|
|
||||||
_deleteUserDataKeysCommand.ExecuteNonQuery();
|
|
||||||
var index = 0;
|
|
||||||
|
|
||||||
foreach (var key in keys)
|
|
||||||
{
|
|
||||||
_saveUserDataKeysCommand.GetParameter(0).Value = itemId;
|
|
||||||
_saveUserDataKeysCommand.GetParameter(1).Value = key;
|
|
||||||
_saveUserDataKeysCommand.GetParameter(2).Value = index;
|
|
||||||
index++;
|
|
||||||
_saveUserDataKeysCommand.Transaction = transaction;
|
|
||||||
|
|
||||||
_saveUserDataKeysCommand.ExecuteNonQuery();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task UpdatePeople(Guid itemId, List<PersonInfo> people)
|
public async Task UpdatePeople(Guid itemId, List<PersonInfo> people)
|
||||||
{
|
{
|
||||||
if (itemId == Guid.Empty)
|
if (itemId == Guid.Empty)
|
||||||
|
@ -4,7 +4,8 @@
|
|||||||
<package id="ini-parser" version="2.3.0" targetFramework="net45" />
|
<package id="ini-parser" version="2.3.0" targetFramework="net45" />
|
||||||
<package id="Interfaces.IO" version="1.0.0.5" targetFramework="net45" />
|
<package id="Interfaces.IO" version="1.0.0.5" targetFramework="net45" />
|
||||||
<package id="MediaBrowser.Naming" version="1.0.0.55" targetFramework="net45" />
|
<package id="MediaBrowser.Naming" version="1.0.0.55" targetFramework="net45" />
|
||||||
|
<package id="Microsoft.IO.RecyclableMemoryStream" version="1.1.0.0" targetFramework="net46" />
|
||||||
<package id="Patterns.Logging" version="1.0.0.2" targetFramework="net45" />
|
<package id="Patterns.Logging" version="1.0.0.2" targetFramework="net45" />
|
||||||
<package id="SimpleInjector" version="3.2.2" targetFramework="net45" />
|
<package id="SimpleInjector" version="3.2.4" targetFramework="net46" />
|
||||||
<package id="SocketHttpListener" version="1.0.0.40" targetFramework="net45" />
|
<package id="SocketHttpListener" version="1.0.0.40" targetFramework="net45" />
|
||||||
</packages>
|
</packages>
|
@ -117,6 +117,7 @@ using MediaBrowser.Model.Serialization;
|
|||||||
using MediaBrowser.Model.Services;
|
using MediaBrowser.Model.Services;
|
||||||
using MediaBrowser.Model.Social;
|
using MediaBrowser.Model.Social;
|
||||||
using MediaBrowser.Model.Xml;
|
using MediaBrowser.Model.Xml;
|
||||||
|
using MediaBrowser.Server.Implementations.Archiving;
|
||||||
using MediaBrowser.Server.Implementations.Reflection;
|
using MediaBrowser.Server.Implementations.Reflection;
|
||||||
using MediaBrowser.Server.Implementations.Xml;
|
using MediaBrowser.Server.Implementations.Xml;
|
||||||
using OpenSubtitlesHandler;
|
using OpenSubtitlesHandler;
|
||||||
@ -222,6 +223,12 @@ namespace MediaBrowser.Server.Startup.Common
|
|||||||
private IMediaSourceManager MediaSourceManager { get; set; }
|
private IMediaSourceManager MediaSourceManager { get; set; }
|
||||||
private IPlaylistManager PlaylistManager { get; set; }
|
private IPlaylistManager PlaylistManager { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the zip client.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The zip client.</value>
|
||||||
|
protected IZipClient ZipClient { get; private set; }
|
||||||
|
|
||||||
private readonly StartupOptions _startupOptions;
|
private readonly StartupOptions _startupOptions;
|
||||||
private readonly string _releaseAssetFilename;
|
private readonly string _releaseAssetFilename;
|
||||||
|
|
||||||
@ -380,6 +387,16 @@ namespace MediaBrowser.Server.Startup.Common
|
|||||||
LogManager.RemoveConsoleOutput();
|
LogManager.RemoveConsoleOutput();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override IMemoryStreamProvider CreateMemoryStreamProvider()
|
||||||
|
{
|
||||||
|
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
|
||||||
|
{
|
||||||
|
return new RecyclableMemoryStreamProvider();
|
||||||
|
}
|
||||||
|
|
||||||
|
return new MemoryStreamProvider();
|
||||||
|
}
|
||||||
|
|
||||||
protected override IJsonSerializer CreateJsonSerializer()
|
protected override IJsonSerializer CreateJsonSerializer()
|
||||||
{
|
{
|
||||||
var result = base.CreateJsonSerializer();
|
var result = base.CreateJsonSerializer();
|
||||||
@ -625,6 +642,9 @@ namespace MediaBrowser.Server.Startup.Common
|
|||||||
{
|
{
|
||||||
await base.RegisterResources(progress).ConfigureAwait(false);
|
await base.RegisterResources(progress).ConfigureAwait(false);
|
||||||
|
|
||||||
|
ZipClient = new ZipClient(FileSystemManager);
|
||||||
|
RegisterSingleInstance(ZipClient);
|
||||||
|
|
||||||
RegisterSingleInstance<IHttpResultFactory>(new HttpResultFactory(LogManager, FileSystemManager, JsonSerializer));
|
RegisterSingleInstance<IHttpResultFactory>(new HttpResultFactory(LogManager, FileSystemManager, JsonSerializer));
|
||||||
|
|
||||||
RegisterSingleInstance<IServerApplicationHost>(this);
|
RegisterSingleInstance<IServerApplicationHost>(this);
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"supports": {
|
"supports": {
|
||||||
"net46.app": {},
|
"net46.app": {},
|
||||||
"dnxcore50.app": {}
|
"dnxcore50.app": {}
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.NETCore": "5.0.0",
|
"Microsoft.NETCore": "5.0.0",
|
||||||
"Microsoft.NETCore.Portable.Compatibility": "1.0.0"
|
"Microsoft.NETCore.Portable.Compatibility": "1.0.1"
|
||||||
},
|
},
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
"dotnet": {
|
"dotnet": {
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user