fix episode paging
This commit is contained in:
parent
a6ebf8b7b9
commit
8497c2926f
|
@ -491,9 +491,10 @@ namespace MediaBrowser.Api
|
|||
returnItems = UserViewBuilder.FilterForAdjacency(returnItems, request.AdjacentTo);
|
||||
}
|
||||
|
||||
returnItems = _libraryManager.ReplaceVideosWithPrimaryVersions(returnItems);
|
||||
var returnList = _libraryManager.ReplaceVideosWithPrimaryVersions(returnItems)
|
||||
.ToList();
|
||||
|
||||
var pagedItems = ApplyPaging(returnItems, request.StartIndex, request.Limit);
|
||||
var pagedItems = ApplyPaging(returnList, request.StartIndex, request.Limit);
|
||||
|
||||
var dtoOptions = GetDtoOptions(request);
|
||||
|
||||
|
@ -502,7 +503,7 @@ namespace MediaBrowser.Api
|
|||
|
||||
return new ItemsResult
|
||||
{
|
||||
TotalRecordCount = dtos.Length,
|
||||
TotalRecordCount = returnList.Count,
|
||||
Items = dtos
|
||||
};
|
||||
}
|
||||
|
|
|
@ -54,6 +54,13 @@ namespace MediaBrowser.Model.ApiClient
|
|||
/// <returns>IApiClient.</returns>
|
||||
IApiClient GetApiClient(IHasServerId item);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the API client.
|
||||
/// </summary>
|
||||
/// <param name="serverId">The server identifier.</param>
|
||||
/// <returns>IApiClient.</returns>
|
||||
IApiClient GetApiClient(string serverId);
|
||||
|
||||
/// <summary>
|
||||
/// Connects the specified cancellation token.
|
||||
/// </summary>
|
||||
|
|
|
@ -135,10 +135,17 @@ namespace MediaBrowser.Server.Implementations.Sync
|
|||
ParentId = request.ParentId
|
||||
};
|
||||
|
||||
// It's just a static list
|
||||
if (!items.Any(i => i.IsFolder || i is IItemByName))
|
||||
if (!request.Category.HasValue && request.ItemIds != null)
|
||||
{
|
||||
job.SyncNewContent = false;
|
||||
var requestedItems = request.ItemIds
|
||||
.Select(_libraryManager.GetItemById)
|
||||
.Where(i => i != null);
|
||||
|
||||
// It's just a static list
|
||||
if (!requestedItems.Any(i => i.IsFolder || i is IItemByName))
|
||||
{
|
||||
job.SyncNewContent = false;
|
||||
}
|
||||
}
|
||||
|
||||
await _repo.Create(job).ConfigureAwait(false);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>MediaBrowser.Common.Internal</id>
|
||||
<version>3.0.571</version>
|
||||
<version>3.0.574</version>
|
||||
<title>MediaBrowser.Common.Internal</title>
|
||||
<authors>Luke</authors>
|
||||
<owners>ebr,Luke,scottisafool</owners>
|
||||
|
@ -12,9 +12,9 @@
|
|||
<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.571" />
|
||||
<dependency id="NLog" version="3.1.0.0" />
|
||||
<dependency id="SimpleInjector" version="2.6.1" />
|
||||
<dependency id="MediaBrowser.Common" version="3.0.574" />
|
||||
<dependency id="NLog" version="3.2.0.0" />
|
||||
<dependency id="SimpleInjector" version="2.7.0" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>MediaBrowser.Common</id>
|
||||
<version>3.0.571</version>
|
||||
<version>3.0.574</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/2011/08/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>MediaBrowser.Model.Signed</id>
|
||||
<version>3.0.571</version>
|
||||
<version>3.0.574</version>
|
||||
<title>MediaBrowser.Model - Signed Edition</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.571</version>
|
||||
<version>3.0.574</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.571" />
|
||||
<dependency id="MediaBrowser.Common" version="3.0.574" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
|
|
Loading…
Reference in New Issue
Block a user