From 2fcf4084f8bd58108bdef65c62b5722bb46d38e5 Mon Sep 17 00:00:00 2001 From: Shadowghost Date: Sun, 21 Jun 2026 09:40:06 +0200 Subject: Add TMDb missing episode provider --- .../Jellyfin.Database.Implementations/DescendantQueryHelper.cs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/Jellyfin.Database/Jellyfin.Database.Implementations/DescendantQueryHelper.cs') diff --git a/src/Jellyfin.Database/Jellyfin.Database.Implementations/DescendantQueryHelper.cs b/src/Jellyfin.Database/Jellyfin.Database.Implementations/DescendantQueryHelper.cs index 88a2c684ff..bfd0fac34a 100644 --- a/src/Jellyfin.Database/Jellyfin.Database.Implementations/DescendantQueryHelper.cs +++ b/src/Jellyfin.Database/Jellyfin.Database.Implementations/DescendantQueryHelper.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Linq.Expressions; using Jellyfin.Database.Implementations.Entities; using Jellyfin.Database.Implementations.MatchCriteria; @@ -12,6 +13,14 @@ namespace Jellyfin.Database.Implementations; /// public static class DescendantQueryHelper { + /// + /// Gets the predicate identifying items that count toward played/total aggregation: + /// real leaf media, i.e. neither folders nor virtual items (missing or unaired episodes). + /// Shared by the per-item and batched count paths so they cannot diverge. + /// + public static Expression> IsCountableLeaf { get; } = + b => !b.IsFolder && !b.IsVirtualItem; + /// /// Gets a queryable of all descendant IDs for a parent item. /// Traverses AncestorIds and LinkedChildren to find all descendants. -- cgit v1.2.3