mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Fix missing episodes query for seasons
This commit is contained in:
parent
ae584beaac
commit
e099fd6141
@ -287,9 +287,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();
|
||||||
@ -386,10 +390,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