diff options
Diffstat (limited to 'MediaBrowser.Common.Implementations')
| -rw-r--r-- | MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj | 8 | ||||
| -rw-r--r-- | MediaBrowser.Common.Implementations/Updates/InstallationManager.cs | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj b/MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj index 718e6b9f6..f3444f01b 100644 --- a/MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj +++ b/MediaBrowser.Common.Implementations/MediaBrowser.Common.Implementations.csproj @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project ToolsVersion="12.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> @@ -14,6 +14,7 @@ <ProductVersion>10.0.0</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> + <TargetFrameworkProfile /> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> @@ -23,7 +24,7 @@ <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> - <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> + <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>none</DebugType> @@ -79,6 +80,9 @@ <Reference Include="Microsoft.CSharp" /> <Reference Include="System.Data" /> <Reference Include="System.Net" /> + <Reference Include="System.Text.Json"> + <HintPath>..\ThirdParty\fastjsonparser\System.Text.Json.dll</HintPath> + </Reference> <Reference Include="System.Xml" /> <Reference Include="ServiceStack.Text"> <HintPath>..\ThirdParty\ServiceStack.Text\ServiceStack.Text.dll</HintPath> diff --git a/MediaBrowser.Common.Implementations/Updates/InstallationManager.cs b/MediaBrowser.Common.Implementations/Updates/InstallationManager.cs index 8c7646209..9674199fe 100644 --- a/MediaBrowser.Common.Implementations/Updates/InstallationManager.cs +++ b/MediaBrowser.Common.Implementations/Updates/InstallationManager.cs @@ -148,14 +148,10 @@ namespace MediaBrowser.Common.Implementations.Updates /// <summary> /// Gets all available packages. /// </summary> - /// <param name="cancellationToken">The cancellation token.</param> - /// <param name="withRegistration">if set to <c>true</c> [with registration].</param> - /// <param name="packageType">Type of the package.</param> - /// <param name="applicationVersion">The application version.</param> /// <returns>Task{List{PackageInfo}}.</returns> public async Task<IEnumerable<PackageInfo>> GetAvailablePackages(CancellationToken cancellationToken, bool withRegistration = true, - PackageType? packageType = null, + string packageType = null, Version applicationVersion = null) { var data = new Dictionary<string, string> @@ -293,7 +289,7 @@ namespace MediaBrowser.Common.Implementations.Updates return packages; } - protected IEnumerable<PackageInfo> FilterPackages(List<PackageInfo> packages, PackageType? packageType, Version applicationVersion) + protected IEnumerable<PackageInfo> FilterPackages(List<PackageInfo> packages, string packageType, Version applicationVersion) { foreach (var package in packages) { @@ -301,9 +297,9 @@ namespace MediaBrowser.Common.Implementations.Updates .OrderByDescending(GetPackageVersion).ToList(); } - if (packageType.HasValue) + if (!string.IsNullOrWhiteSpace(packageType)) { - packages = packages.Where(p => p.type == packageType.Value).ToList(); + packages = packages.Where(p => string.Equals(p.type, packageType, StringComparison.OrdinalIgnoreCase)).ToList(); } // If an app version was supplied, filter the versions for each package to only include supported versions |
