mirror of https://github.com/jellyfin/jellyfin.git
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:
parent
e577fea59c
commit
812a4170ee
|
@ -3524,6 +3524,12 @@ namespace Emby.Server.Implementations.Data
|
||||||
statement?.TryBind("@MinIndexNumber", query.MinIndexNumber.Value);
|
statement?.TryBind("@MinIndexNumber", query.MinIndexNumber.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (query.MinParentIndexNumber.HasValue)
|
||||||
|
{
|
||||||
|
whereClauses.Add("ParentIndexNumber>=@MinParentIndexNumber");
|
||||||
|
statement?.TryBind("@MinParentIndexNumber", query.MinParentIndexNumber.Value);
|
||||||
|
}
|
||||||
|
|
||||||
if (query.MinDateCreated.HasValue)
|
if (query.MinDateCreated.HasValue)
|
||||||
{
|
{
|
||||||
whereClauses.Add("DateCreated>=@MinDateCreated");
|
whereClauses.Add("DateCreated>=@MinDateCreated");
|
||||||
|
|
|
@ -223,7 +223,9 @@ namespace Emby.Server.Implementations.TV
|
||||||
IsPlayed = rewatching,
|
IsPlayed = rewatching,
|
||||||
IsVirtualItem = false,
|
IsVirtualItem = false,
|
||||||
ParentIndexNumberNotEquals = 0,
|
ParentIndexNumberNotEquals = 0,
|
||||||
DtoOptions = dtoOptions
|
DtoOptions = dtoOptions,
|
||||||
|
MinIndexNumber = lastWatchedEpisode?.IndexNumberEnd ?? lastWatchedEpisode?.IndexNumber,
|
||||||
|
MinParentIndexNumber = lastWatchedEpisode?.ParentIndexNumber
|
||||||
};
|
};
|
||||||
|
|
||||||
Episode nextEpisode;
|
Episode nextEpisode;
|
||||||
|
|
|
@ -205,6 +205,8 @@ namespace MediaBrowser.Controller.Entities
|
||||||
|
|
||||||
public int? MinIndexNumber { get; set; }
|
public int? MinIndexNumber { get; set; }
|
||||||
|
|
||||||
|
public int? MinParentIndexNumber { get; set; }
|
||||||
|
|
||||||
public int? AiredDuringSeason { get; set; }
|
public int? AiredDuringSeason { get; set; }
|
||||||
|
|
||||||
public double? MinCriticRating { get; set; }
|
public double? MinCriticRating { get; set; }
|
||||||
|
|
Loading…
Reference in New Issue