mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-06-03 13:44:22 -04:00
Backport pull request #12425 from jellyfin/release-10.9.z
Don't force non-virtual when all episodes in season are isMissing=true Original-merge: be949af59e550819f68463453dbfb52ea4c01b17 Merged-by: Bond-009 <bond.009@outlook.com> Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
parent
bdb2d81687
commit
1ca2c4b4e1
@ -211,8 +211,12 @@ namespace MediaBrowser.Providers.TV
|
|||||||
}
|
}
|
||||||
else if (existingSeason.IsVirtualItem)
|
else if (existingSeason.IsVirtualItem)
|
||||||
{
|
{
|
||||||
existingSeason.IsVirtualItem = false;
|
var episodeCount = seriesChildren.OfType<Episode>().Count(e => e.ParentIndexNumber == seasonNumber && !e.IsMissingEpisode);
|
||||||
await existingSeason.UpdateToRepositoryAsync(ItemUpdateType.MetadataEdit, cancellationToken).ConfigureAwait(false);
|
if (episodeCount > 0)
|
||||||
|
{
|
||||||
|
existingSeason.IsVirtualItem = false;
|
||||||
|
await existingSeason.UpdateToRepositoryAsync(ItemUpdateType.MetadataEdit, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user