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