updated nuget
This commit is contained in:
parent
37f0e23bf4
commit
06c611dd50
|
@ -20,7 +20,7 @@ namespace MediaBrowser.Api
|
||||||
{
|
{
|
||||||
[Route("/Items/{Id}/File", "GET")]
|
[Route("/Items/{Id}/File", "GET")]
|
||||||
[Api(Description = "Gets the original file of an item")]
|
[Api(Description = "Gets the original file of an item")]
|
||||||
public class GetFile
|
public class GetFile
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the id.
|
/// Gets or sets the id.
|
||||||
|
@ -29,7 +29,7 @@ namespace MediaBrowser.Api
|
||||||
[ApiMember(Name = "Id", Description = "Item Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
|
[ApiMember(Name = "Id", Description = "Item Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class GetCriticReviews
|
/// Class GetCriticReviews
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -174,7 +174,7 @@ namespace MediaBrowser.Api
|
||||||
[ApiMember(Name = "Id", Description = "Item Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
|
[ApiMember(Name = "Id", Description = "Item Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "GET")]
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Class LibraryService
|
/// Class LibraryService
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -217,7 +217,7 @@ namespace MediaBrowser.Api
|
||||||
|
|
||||||
return ToStaticFileResult(item.Path);
|
return ToStaticFileResult(item.Path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the specified request.
|
/// Gets the specified request.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -301,7 +301,7 @@ namespace MediaBrowser.Api
|
||||||
/// <returns>System.Object.</returns>
|
/// <returns>System.Object.</returns>
|
||||||
public object Get(GetCriticReviews request)
|
public object Get(GetCriticReviews request)
|
||||||
{
|
{
|
||||||
var result = GetCriticReviewsAsync(request).Result;
|
var result = GetCriticReviews(request);
|
||||||
|
|
||||||
return ToOptimizedResult(result);
|
return ToOptimizedResult(result);
|
||||||
}
|
}
|
||||||
|
@ -430,9 +430,9 @@ namespace MediaBrowser.Api
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="request">The request.</param>
|
/// <param name="request">The request.</param>
|
||||||
/// <returns>Task{ItemReviewsResult}.</returns>
|
/// <returns>Task{ItemReviewsResult}.</returns>
|
||||||
private async Task<ItemReviewsResult> GetCriticReviewsAsync(GetCriticReviews request)
|
private ItemReviewsResult GetCriticReviews(GetCriticReviews request)
|
||||||
{
|
{
|
||||||
var reviews = await _itemRepo.GetCriticReviews(new Guid(request.Id)).ConfigureAwait(false);
|
var reviews = _itemRepo.GetCriticReviews(new Guid(request.Id));
|
||||||
|
|
||||||
var reviewsArray = reviews.ToArray();
|
var reviewsArray = reviews.ToArray();
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ namespace MediaBrowser.Controller.Persistence
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="itemId">The item id.</param>
|
/// <param name="itemId">The item id.</param>
|
||||||
/// <returns>Task{IEnumerable{ItemReview}}.</returns>
|
/// <returns>Task{IEnumerable{ItemReview}}.</returns>
|
||||||
Task<IEnumerable<ItemReview>> GetCriticReviews(Guid itemId);
|
IEnumerable<ItemReview> GetCriticReviews(Guid itemId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Saves the critic reviews.
|
/// Saves the critic reviews.
|
||||||
|
|
|
@ -24,7 +24,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||||
|
|
||||||
private readonly ILogger _logger;
|
private readonly ILogger _logger;
|
||||||
|
|
||||||
private TypeMapper _typeMapper = new TypeMapper();
|
private readonly TypeMapper _typeMapper = new TypeMapper();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the name of the repository
|
/// Gets the name of the repository
|
||||||
|
@ -307,27 +307,22 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="itemId">The item id.</param>
|
/// <param name="itemId">The item id.</param>
|
||||||
/// <returns>Task{IEnumerable{ItemReview}}.</returns>
|
/// <returns>Task{IEnumerable{ItemReview}}.</returns>
|
||||||
public Task<IEnumerable<ItemReview>> GetCriticReviews(Guid itemId)
|
public IEnumerable<ItemReview> GetCriticReviews(Guid itemId)
|
||||||
{
|
{
|
||||||
return Task.Run<IEnumerable<ItemReview>>(() =>
|
try
|
||||||
{
|
{
|
||||||
|
var path = Path.Combine(_criticReviewsPath, itemId + ".json");
|
||||||
|
|
||||||
try
|
return _jsonSerializer.DeserializeFromFile<List<ItemReview>>(path);
|
||||||
{
|
}
|
||||||
var path = Path.Combine(_criticReviewsPath, itemId + ".json");
|
catch (DirectoryNotFoundException)
|
||||||
|
{
|
||||||
return _jsonSerializer.DeserializeFromFile<List<ItemReview>>(path);
|
return new List<ItemReview>();
|
||||||
}
|
}
|
||||||
catch (DirectoryNotFoundException)
|
catch (FileNotFoundException)
|
||||||
{
|
{
|
||||||
return new List<ItemReview>();
|
return new List<ItemReview>();
|
||||||
}
|
}
|
||||||
catch (FileNotFoundException)
|
|
||||||
{
|
|
||||||
return new List<ItemReview>();
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Common.Internal</id>
|
<id>MediaBrowser.Common.Internal</id>
|
||||||
<version>3.0.199</version>
|
<version>3.0.200</version>
|
||||||
<title>MediaBrowser.Common.Internal</title>
|
<title>MediaBrowser.Common.Internal</title>
|
||||||
<authors>Luke</authors>
|
<authors>Luke</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
<description>Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption.</description>
|
<description>Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption.</description>
|
||||||
<copyright>Copyright © Media Browser 2013</copyright>
|
<copyright>Copyright © Media Browser 2013</copyright>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency id="MediaBrowser.Common" version="3.0.199" />
|
<dependency id="MediaBrowser.Common" version="3.0.200" />
|
||||||
<dependency id="NLog" version="2.0.1.2" />
|
<dependency id="NLog" version="2.0.1.2" />
|
||||||
<dependency id="ServiceStack.Text" version="3.9.58" />
|
<dependency id="ServiceStack.Text" version="3.9.58" />
|
||||||
<dependency id="SimpleInjector" version="2.3.2" />
|
<dependency id="SimpleInjector" version="2.3.2" />
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Common</id>
|
<id>MediaBrowser.Common</id>
|
||||||
<version>3.0.199</version>
|
<version>3.0.200</version>
|
||||||
<title>MediaBrowser.Common</title>
|
<title>MediaBrowser.Common</title>
|
||||||
<authors>Media Browser Team</authors>
|
<authors>Media Browser Team</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||||
<metadata>
|
<metadata>
|
||||||
<id>MediaBrowser.Server.Core</id>
|
<id>MediaBrowser.Server.Core</id>
|
||||||
<version>3.0.199</version>
|
<version>3.0.200</version>
|
||||||
<title>Media Browser.Server.Core</title>
|
<title>Media Browser.Server.Core</title>
|
||||||
<authors>Media Browser Team</authors>
|
<authors>Media Browser Team</authors>
|
||||||
<owners>ebr,Luke,scottisafool</owners>
|
<owners>ebr,Luke,scottisafool</owners>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
<description>Contains core components required to build plugins for Media Browser Server.</description>
|
<description>Contains core components required to build plugins for Media Browser Server.</description>
|
||||||
<copyright>Copyright © Media Browser 2013</copyright>
|
<copyright>Copyright © Media Browser 2013</copyright>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency id="MediaBrowser.Common" version="3.0.199" />
|
<dependency id="MediaBrowser.Common" version="3.0.200" />
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</metadata>
|
</metadata>
|
||||||
<files>
|
<files>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user