mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-04-24 14:08:44 -04:00
Fix InvalidCastException in ItemUpdateController (#11398)
This commit is contained in:
parent
f3b4d72423
commit
a80968478a
1 changed files with 3 additions and 3 deletions
|
@ -288,7 +288,7 @@ public class ItemUpdateController : BaseJellyfinApiController
|
|||
|
||||
if (item is Series rseries)
|
||||
{
|
||||
foreach (Season season in rseries.Children)
|
||||
foreach (var season in rseries.Children.OfType<Season>())
|
||||
{
|
||||
season.OfficialRating = request.OfficialRating;
|
||||
season.CustomRating = request.CustomRating;
|
||||
|
@ -296,7 +296,7 @@ public class ItemUpdateController : BaseJellyfinApiController
|
|||
season.OnMetadataChanged();
|
||||
await season.UpdateToRepositoryAsync(ItemUpdateType.MetadataEdit, CancellationToken.None).ConfigureAwait(false);
|
||||
|
||||
foreach (Episode ep in season.Children)
|
||||
foreach (var ep in season.Children.OfType<Episode>())
|
||||
{
|
||||
ep.OfficialRating = request.OfficialRating;
|
||||
ep.CustomRating = request.CustomRating;
|
||||
|
@ -308,7 +308,7 @@ public class ItemUpdateController : BaseJellyfinApiController
|
|||
}
|
||||
else if (item is Season season)
|
||||
{
|
||||
foreach (Episode ep in season.Children)
|
||||
foreach (var ep in season.Children.OfType<Episode>())
|
||||
{
|
||||
ep.OfficialRating = request.OfficialRating;
|
||||
ep.CustomRating = request.CustomRating;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue