updated servicestack to 3.9.40

This commit is contained in:
LukePulverenti 2013-03-18 16:40:15 -04:00
parent cf61ac0264
commit bd094311f0
12 changed files with 101 additions and 79 deletions

View File

@ -39,37 +39,37 @@
<Reference Include="MoreLinq">
<HintPath>..\packages\morelinq.1.0.15631-beta\lib\net35\MoreLinq.dll</HintPath>
</Reference>
<Reference Include="ServiceStack, Version=3.9.38.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="ServiceStack, Version=3.9.40.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ServiceStack.3.9.38\lib\net35\ServiceStack.dll</HintPath>
<HintPath>..\packages\ServiceStack.3.9.40\lib\net35\ServiceStack.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.Common, Version=3.9.38.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="ServiceStack.Common, Version=3.9.40.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ServiceStack.Common.3.9.38\lib\net35\ServiceStack.Common.dll</HintPath>
<HintPath>..\packages\ServiceStack.Common.3.9.40\lib\net35\ServiceStack.Common.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.Interfaces, Version=3.9.38.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="ServiceStack.Interfaces, Version=3.9.40.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ServiceStack.Common.3.9.38\lib\net35\ServiceStack.Interfaces.dll</HintPath>
<HintPath>..\packages\ServiceStack.Common.3.9.40\lib\net35\ServiceStack.Interfaces.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.OrmLite, Version=3.9.39.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="ServiceStack.OrmLite, Version=3.9.41.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ServiceStack.OrmLite.SqlServer.3.9.39\lib\ServiceStack.OrmLite.dll</HintPath>
<HintPath>..\packages\ServiceStack.OrmLite.SqlServer.3.9.41\lib\ServiceStack.OrmLite.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.OrmLite.SqlServer, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ServiceStack.OrmLite.SqlServer.3.9.39\lib\ServiceStack.OrmLite.SqlServer.dll</HintPath>
<HintPath>..\packages\ServiceStack.OrmLite.SqlServer.3.9.41\lib\ServiceStack.OrmLite.SqlServer.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.Redis, Version=3.9.38.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="ServiceStack.Redis, Version=3.9.40.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ServiceStack.Redis.3.9.38\lib\net35\ServiceStack.Redis.dll</HintPath>
<HintPath>..\packages\ServiceStack.Redis.3.9.40\lib\net35\ServiceStack.Redis.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.ServiceInterface, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ServiceStack.3.9.38\lib\net35\ServiceStack.ServiceInterface.dll</HintPath>
<HintPath>..\packages\ServiceStack.3.9.40\lib\net35\ServiceStack.ServiceInterface.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.Text, Version=3.9.38.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="ServiceStack.Text, Version=3.9.40.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ServiceStack.Text.3.9.38\lib\net35\ServiceStack.Text.dll</HintPath>
<HintPath>..\packages\ServiceStack.Text.3.9.40\lib\net35\ServiceStack.Text.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />

View File

@ -2,7 +2,6 @@
using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Querying;
using MediaBrowser.Server.Implementations.HttpServer;
using ServiceStack.ServiceHost;
using System;
using System.Collections.Generic;

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="morelinq" version="1.0.15631-beta" targetFramework="net45" />
<package id="ServiceStack" version="3.9.38" targetFramework="net45" />
<package id="ServiceStack.Common" version="3.9.38" targetFramework="net45" />
<package id="ServiceStack.OrmLite.SqlServer" version="3.9.39" targetFramework="net45" />
<package id="ServiceStack.Redis" version="3.9.38" targetFramework="net45" />
<package id="ServiceStack.Text" version="3.9.38" targetFramework="net45" />
<package id="ServiceStack" version="3.9.40" targetFramework="net45" />
<package id="ServiceStack.Common" version="3.9.40" targetFramework="net45" />
<package id="ServiceStack.OrmLite.SqlServer" version="3.9.41" targetFramework="net45" />
<package id="ServiceStack.Redis" version="3.9.40" targetFramework="net45" />
<package id="ServiceStack.Text" version="3.9.40" targetFramework="net45" />
</packages>

View File

@ -44,9 +44,9 @@
<Reference Include="protobuf-net">
<HintPath>..\packages\protobuf-net.2.0.0.621\lib\net40\protobuf-net.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.Text, Version=3.9.38.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="ServiceStack.Text, Version=3.9.40.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ServiceStack.Text.3.9.38\lib\net35\ServiceStack.Text.dll</HintPath>
<HintPath>..\packages\ServiceStack.Text.3.9.40\lib\net35\ServiceStack.Text.dll</HintPath>
</Reference>
<Reference Include="SimpleInjector">
<HintPath>..\packages\SimpleInjector.2.0.0-beta5\lib\net40-client\SimpleInjector.dll</HintPath>

View File

@ -2,6 +2,6 @@
<packages>
<package id="NLog" version="2.0.0.2000" targetFramework="net45" />
<package id="protobuf-net" version="2.0.0.621" targetFramework="net45" />
<package id="ServiceStack.Text" version="3.9.38" targetFramework="net45" />
<package id="ServiceStack.Text" version="3.9.40" targetFramework="net45" />
<package id="SimpleInjector" version="2.0.0-beta5" targetFramework="net45" />
</packages>

View File

@ -119,7 +119,7 @@ namespace MediaBrowser.Controller.Drawing
{
try
{
originalImagePath = GetCroppedImage(originalImagePath, dateModified);
originalImagePath = await GetCroppedImage(originalImagePath, dateModified).ConfigureAwait(false);
}
catch (Exception ex)
{
@ -433,7 +433,7 @@ namespace MediaBrowser.Controller.Drawing
/// <param name="originalImagePath">The original image path.</param>
/// <param name="dateModified">The date modified.</param>
/// <returns>System.String.</returns>
private string GetCroppedImage(string originalImagePath, DateTime dateModified)
private async Task<string> GetCroppedImage(string originalImagePath, DateTime dateModified)
{
var name = originalImagePath;
name += "datemodified=" + dateModified.Ticks;
@ -450,10 +450,7 @@ namespace MediaBrowser.Controller.Drawing
using (var croppedImage = originalImage.CropWhitespace())
{
using (var cacheFileStream = new FileStream(croppedImagePath, FileMode.Create))
{
croppedImage.Save(outputFormat, cacheFileStream, 100);
}
await SaveImageToFile(croppedImage, outputFormat, croppedImagePath).ConfigureAwait(false);
}
}
}
@ -462,6 +459,21 @@ namespace MediaBrowser.Controller.Drawing
return croppedImagePath;
}
private async Task SaveImageToFile(Image image, ImageFormat outputFormat, string file)
{
using (var memoryStream = new MemoryStream())
{
image.Save(outputFormat, memoryStream, 100);
memoryStream.Position = 0;
using (var cacheFileStream = new FileStream(file, FileMode.Create, FileAccess.Write, FileShare.Read, StreamDefaults.DefaultFileStreamBufferSize, FileOptions.Asynchronous))
{
await memoryStream.CopyToAsync(cacheFileStream).ConfigureAwait(false);
}
}
}
/// <summary>
/// Runs an image through the image enhancers, caches the result, and returns the cached path
/// </summary>
@ -507,7 +519,7 @@ namespace MediaBrowser.Controller.Drawing
using (var newImage = await ExecuteImageEnhancers(supportedEnhancers, originalImage, item, imageType, imageIndex).ConfigureAwait(false))
{
//And then save it in the cache
newImage.Save(enhancedImagePath, ImageFormat.Png);
await SaveImageToFile(newImage, ImageFormat.Png, enhancedImagePath).ConfigureAwait(false);
}
}
}

View File

@ -82,8 +82,9 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\DotNetZip.1.9.1.8\lib\net20\Ionic.Zip.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.Text">
<HintPath>..\packages\ServiceStack.Text.3.9.38\lib\net35\ServiceStack.Text.dll</HintPath>
<Reference Include="ServiceStack.Text, Version=3.9.40.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ServiceStack.Text.3.9.40\lib\net35\ServiceStack.Text.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="DotNetZip" version="1.9.1.8" targetFramework="net45" />
<package id="ServiceStack.Text" version="3.9.38" targetFramework="net45" />
<package id="ServiceStack.Text" version="3.9.40" targetFramework="net45" />
</packages>

View File

@ -45,35 +45,45 @@
<Reference Include="NLog">
<HintPath>..\packages\NLog.2.0.0.2000\lib\net40\NLog.dll</HintPath>
</Reference>
<Reference Include="ServiceStack">
<HintPath>..\packages\ServiceStack.3.9.38\lib\net35\ServiceStack.dll</HintPath>
<Reference Include="ServiceStack, Version=3.9.40.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ServiceStack.3.9.40\lib\net35\ServiceStack.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.Api.Swagger">
<HintPath>..\packages\ServiceStack.Api.Swagger.3.9.38\lib\net35\ServiceStack.Api.Swagger.dll</HintPath>
<Reference Include="ServiceStack.Api.Swagger, Version=3.9.40.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ServiceStack.Api.Swagger.3.9.40\lib\net35\ServiceStack.Api.Swagger.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.Common">
<HintPath>..\packages\ServiceStack.Common.3.9.38\lib\net35\ServiceStack.Common.dll</HintPath>
<Reference Include="ServiceStack.Common, Version=3.9.40.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ServiceStack.Common.3.9.40\lib\net35\ServiceStack.Common.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.Interfaces">
<HintPath>..\packages\ServiceStack.Common.3.9.38\lib\net35\ServiceStack.Interfaces.dll</HintPath>
<Reference Include="ServiceStack.Interfaces, Version=3.9.40.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ServiceStack.Common.3.9.40\lib\net35\ServiceStack.Interfaces.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.Logging.NLog">
<HintPath>..\packages\ServiceStack.Logging.NLog.1.0.6.0\lib\net35\ServiceStack.Logging.NLog.dll</HintPath>
<Reference Include="ServiceStack.Logging.NLog, Version=1.0.8.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ServiceStack.Logging.NLog.1.0.8.0\lib\net35\ServiceStack.Logging.NLog.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.OrmLite">
<HintPath>..\packages\ServiceStack.OrmLite.SqlServer.3.9.39\lib\ServiceStack.OrmLite.dll</HintPath>
<Reference Include="ServiceStack.OrmLite, Version=3.9.41.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ServiceStack.OrmLite.SqlServer.3.9.41\lib\ServiceStack.OrmLite.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.OrmLite.SqlServer">
<HintPath>..\packages\ServiceStack.OrmLite.SqlServer.3.9.39\lib\ServiceStack.OrmLite.SqlServer.dll</HintPath>
<Reference Include="ServiceStack.OrmLite.SqlServer, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ServiceStack.OrmLite.SqlServer.3.9.41\lib\ServiceStack.OrmLite.SqlServer.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.Redis">
<HintPath>..\packages\ServiceStack.Redis.3.9.38\lib\net35\ServiceStack.Redis.dll</HintPath>
<Reference Include="ServiceStack.Redis, Version=3.9.40.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ServiceStack.Redis.3.9.40\lib\net35\ServiceStack.Redis.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.ServiceInterface">
<HintPath>..\packages\ServiceStack.3.9.38\lib\net35\ServiceStack.ServiceInterface.dll</HintPath>
<Reference Include="ServiceStack.ServiceInterface, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ServiceStack.3.9.40\lib\net35\ServiceStack.ServiceInterface.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.Text">
<HintPath>..\packages\ServiceStack.Text.3.9.38\lib\net35\ServiceStack.Text.dll</HintPath>
<Reference Include="ServiceStack.Text, Version=3.9.40.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ServiceStack.Text.3.9.40\lib\net35\ServiceStack.Text.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />

View File

@ -7,12 +7,12 @@
<package id="Rx-Core" version="2.1.30214.0" targetFramework="net45" />
<package id="Rx-Interfaces" version="2.1.30214.0" targetFramework="net45" />
<package id="Rx-Linq" version="2.1.30214.0" targetFramework="net45" />
<package id="ServiceStack" version="3.9.38" targetFramework="net45" />
<package id="ServiceStack.Api.Swagger" version="3.9.38" targetFramework="net45" />
<package id="ServiceStack.Common" version="3.9.38" targetFramework="net45" />
<package id="ServiceStack.Logging.NLog" version="1.0.6.0" targetFramework="net45" />
<package id="ServiceStack.OrmLite.SqlServer" version="3.9.39" targetFramework="net45" />
<package id="ServiceStack.Redis" version="3.9.38" targetFramework="net45" />
<package id="ServiceStack.Text" version="3.9.38" targetFramework="net45" />
<package id="ServiceStack" version="3.9.40" targetFramework="net45" />
<package id="ServiceStack.Api.Swagger" version="3.9.40" targetFramework="net45" />
<package id="ServiceStack.Common" version="3.9.40" targetFramework="net45" />
<package id="ServiceStack.Logging.NLog" version="1.0.8.0" targetFramework="net45" />
<package id="ServiceStack.OrmLite.SqlServer" version="3.9.41" targetFramework="net45" />
<package id="ServiceStack.Redis" version="3.9.40" targetFramework="net45" />
<package id="ServiceStack.Text" version="3.9.40" targetFramework="net45" />
<package id="System.Data.SQLite" version="1.0.84.0" targetFramework="net45" />
</packages>

View File

@ -35,37 +35,37 @@
<RunPostBuildEvent>Always</RunPostBuildEvent>
</PropertyGroup>
<ItemGroup>
<Reference Include="ServiceStack, Version=3.9.38.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="ServiceStack, Version=3.9.40.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ServiceStack.3.9.38\lib\net35\ServiceStack.dll</HintPath>
<HintPath>..\packages\ServiceStack.3.9.40\lib\net35\ServiceStack.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.Common, Version=3.9.38.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="ServiceStack.Common, Version=3.9.40.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ServiceStack.Common.3.9.38\lib\net35\ServiceStack.Common.dll</HintPath>
<HintPath>..\packages\ServiceStack.Common.3.9.40\lib\net35\ServiceStack.Common.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.Interfaces, Version=3.9.38.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="ServiceStack.Interfaces, Version=3.9.40.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ServiceStack.Common.3.9.38\lib\net35\ServiceStack.Interfaces.dll</HintPath>
<HintPath>..\packages\ServiceStack.Common.3.9.40\lib\net35\ServiceStack.Interfaces.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.OrmLite, Version=3.9.39.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="ServiceStack.OrmLite, Version=3.9.41.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ServiceStack.OrmLite.SqlServer.3.9.39\lib\ServiceStack.OrmLite.dll</HintPath>
<HintPath>..\packages\ServiceStack.OrmLite.SqlServer.3.9.41\lib\ServiceStack.OrmLite.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.OrmLite.SqlServer, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ServiceStack.OrmLite.SqlServer.3.9.39\lib\ServiceStack.OrmLite.SqlServer.dll</HintPath>
<HintPath>..\packages\ServiceStack.OrmLite.SqlServer.3.9.41\lib\ServiceStack.OrmLite.SqlServer.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.Redis, Version=3.9.38.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="ServiceStack.Redis, Version=3.9.40.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ServiceStack.Redis.3.9.38\lib\net35\ServiceStack.Redis.dll</HintPath>
<HintPath>..\packages\ServiceStack.Redis.3.9.40\lib\net35\ServiceStack.Redis.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.ServiceInterface, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ServiceStack.3.9.38\lib\net35\ServiceStack.ServiceInterface.dll</HintPath>
<HintPath>..\packages\ServiceStack.3.9.40\lib\net35\ServiceStack.ServiceInterface.dll</HintPath>
</Reference>
<Reference Include="ServiceStack.Text, Version=3.9.38.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="ServiceStack.Text, Version=3.9.40.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ServiceStack.Text.3.9.38\lib\net35\ServiceStack.Text.dll</HintPath>
<HintPath>..\packages\ServiceStack.Text.3.9.40\lib\net35\ServiceStack.Text.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MediaBrowser.ApiClient.Javascript" version="3.0.48" targetFramework="net45" />
<package id="ServiceStack" version="3.9.38" targetFramework="net45" />
<package id="ServiceStack.Common" version="3.9.38" targetFramework="net45" />
<package id="ServiceStack.OrmLite.SqlServer" version="3.9.39" targetFramework="net45" />
<package id="ServiceStack.Redis" version="3.9.38" targetFramework="net45" />
<package id="ServiceStack.Text" version="3.9.38" targetFramework="net45" />
<package id="ServiceStack" version="3.9.40" targetFramework="net45" />
<package id="ServiceStack.Common" version="3.9.40" targetFramework="net45" />
<package id="ServiceStack.OrmLite.SqlServer" version="3.9.41" targetFramework="net45" />
<package id="ServiceStack.Redis" version="3.9.40" targetFramework="net45" />
<package id="ServiceStack.Text" version="3.9.40" targetFramework="net45" />
</packages>