mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 22:13:06 +03:00
Backport pull request #8662 from jellyfin/release-10.8.z
fix: use a combination of ParentIndexNumber and IndexNumber to determine next up episodes
Original-merge: 45f3fb1cfc
Merged-by: Joshua M. Boniface <joshua@boniface.me>
Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
committed by
Joshua M. Boniface
parent
7725949ead
commit
08d2acba20
@@ -3524,10 +3524,11 @@ namespace Emby.Server.Implementations.Data
|
||||
statement?.TryBind("@MinIndexNumber", query.MinIndexNumber.Value);
|
||||
}
|
||||
|
||||
if (query.MinParentIndexNumber.HasValue)
|
||||
if (query.MinParentAndIndexNumber.HasValue)
|
||||
{
|
||||
whereClauses.Add("ParentIndexNumber>=@MinParentIndexNumber");
|
||||
statement?.TryBind("@MinParentIndexNumber", query.MinParentIndexNumber.Value);
|
||||
whereClauses.Add("((ParentIndexNumber=@MinParentAndIndexNumberParent and IndexNumber>=@MinParentAndIndexNumberIndex) or ParentIndexNumber>@MinParentAndIndexNumberParent)");
|
||||
statement?.TryBind("@MinParentAndIndexNumberParent", query.MinParentAndIndexNumber.Value.ParentIndexNumber);
|
||||
statement?.TryBind("@MinParentAndIndexNumberIndex", query.MinParentAndIndexNumber.Value.IndexNumber);
|
||||
}
|
||||
|
||||
if (query.MinDateCreated.HasValue)
|
||||
|
||||
Reference in New Issue
Block a user