Backport pull request #8501 from jellyfin/release-10.8.z

fix: set MinIndexNumber for the next up query

Original-merge: 679e83082f

Merged-by: Claus Vium <cvium@users.noreply.github.com>

Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
cvium 2022-10-28 22:38:58 -04:00 committed by Joshua M. Boniface
parent e577fea59c
commit 812a4170ee
3 changed files with 11 additions and 1 deletions

View File

@ -3524,6 +3524,12 @@ namespace Emby.Server.Implementations.Data
statement?.TryBind("@MinIndexNumber", query.MinIndexNumber.Value);
}
if (query.MinParentIndexNumber.HasValue)
{
whereClauses.Add("ParentIndexNumber>=@MinParentIndexNumber");
statement?.TryBind("@MinParentIndexNumber", query.MinParentIndexNumber.Value);
}
if (query.MinDateCreated.HasValue)
{
whereClauses.Add("DateCreated>=@MinDateCreated");

View File

@ -223,7 +223,9 @@ namespace Emby.Server.Implementations.TV
IsPlayed = rewatching,
IsVirtualItem = false,
ParentIndexNumberNotEquals = 0,
DtoOptions = dtoOptions
DtoOptions = dtoOptions,
MinIndexNumber = lastWatchedEpisode?.IndexNumberEnd ?? lastWatchedEpisode?.IndexNumber,
MinParentIndexNumber = lastWatchedEpisode?.ParentIndexNumber
};
Episode nextEpisode;

View File

@ -205,6 +205,8 @@ namespace MediaBrowser.Controller.Entities
public int? MinIndexNumber { get; set; }
public int? MinParentIndexNumber { get; set; }
public int? AiredDuringSeason { get; set; }
public double? MinCriticRating { get; set; }