mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Backport pull request #11882 from jellyfin/release-10.9.z
Fix missing episodes query for seasons Original-merge: 8e979bdb4bd33fb152a351c4f42d5d0542bad98c Merged-by: joshuaboniface <joshua@boniface.me> Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
parent
4035f6aa21
commit
c1032967c2
@ -261,9 +261,13 @@ namespace MediaBrowser.Controller.Entities.TV
|
|||||||
IncludeItemTypes = new[] { BaseItemKind.Episode, BaseItemKind.Season },
|
IncludeItemTypes = new[] { BaseItemKind.Episode, BaseItemKind.Season },
|
||||||
OrderBy = new[] { (ItemSortBy.SortName, SortOrder.Ascending) },
|
OrderBy = new[] { (ItemSortBy.SortName, SortOrder.Ascending) },
|
||||||
DtoOptions = options,
|
DtoOptions = options,
|
||||||
IsMissing = shouldIncludeMissingEpisodes
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!shouldIncludeMissingEpisodes)
|
||||||
|
{
|
||||||
|
query.IsMissing = false;
|
||||||
|
}
|
||||||
|
|
||||||
var allItems = LibraryManager.GetItemList(query);
|
var allItems = LibraryManager.GetItemList(query);
|
||||||
|
|
||||||
var allSeriesEpisodes = allItems.OfType<Episode>().ToList();
|
var allSeriesEpisodes = allItems.OfType<Episode>().ToList();
|
||||||
@ -359,10 +363,14 @@ namespace MediaBrowser.Controller.Entities.TV
|
|||||||
SeriesPresentationUniqueKey = queryFromSeries ? seriesKey : null,
|
SeriesPresentationUniqueKey = queryFromSeries ? seriesKey : null,
|
||||||
IncludeItemTypes = new[] { BaseItemKind.Episode },
|
IncludeItemTypes = new[] { BaseItemKind.Episode },
|
||||||
OrderBy = new[] { (ItemSortBy.SortName, SortOrder.Ascending) },
|
OrderBy = new[] { (ItemSortBy.SortName, SortOrder.Ascending) },
|
||||||
DtoOptions = options,
|
DtoOptions = options
|
||||||
IsMissing = shouldIncludeMissingEpisodes
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!shouldIncludeMissingEpisodes)
|
||||||
|
{
|
||||||
|
query.IsMissing = false;
|
||||||
|
}
|
||||||
|
|
||||||
var allItems = LibraryManager.GetItemList(query);
|
var allItems = LibraryManager.GetItemList(query);
|
||||||
|
|
||||||
return GetSeasonEpisodes(parentSeason, user, allItems, options, shouldIncludeMissingEpisodes);
|
return GetSeasonEpisodes(parentSeason, user, allItems, options, shouldIncludeMissingEpisodes);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user