Quellcode durchsuchen

Fix GET MetadataEditor ContentTypeOptions for inheritedContentType

SmeagolWorms4 vor 1 Woche
Ursprung
Commit
d0950c8f09
1 geänderte Dateien mit 5 neuen und 2 gelöschten Zeilen
  1. 5 2
      Jellyfin.Api/Controllers/ItemUpdateController.cs

+ 5 - 2
Jellyfin.Api/Controllers/ItemUpdateController.cs

@@ -180,11 +180,14 @@ public class ItemUpdateController : BaseJellyfinApiController
                 info.ContentTypeOptions = GetContentTypeOptions(true).ToArray();
                 info.ContentTypeOptions = GetContentTypeOptions(true).ToArray();
                 info.ContentType = configuredContentType;
                 info.ContentType = configuredContentType;
 
 
-                if (inheritedContentType is null || inheritedContentType == CollectionType.tvshows)
+                if (inheritedContentType is null
+                    || inheritedContentType == CollectionType.tvshows
+                    || inheritedContentType == CollectionType.movies)
                 {
                 {
                     info.ContentTypeOptions = info.ContentTypeOptions
                     info.ContentTypeOptions = info.ContentTypeOptions
                         .Where(i => string.IsNullOrWhiteSpace(i.Value)
                         .Where(i => string.IsNullOrWhiteSpace(i.Value)
-                                    || string.Equals(i.Value, "TvShows", StringComparison.OrdinalIgnoreCase))
+                                    || string.Equals(i.Value, "TvShows", StringComparison.OrdinalIgnoreCase)
+                                    || string.Equals(i.Value, "Movies", StringComparison.OrdinalIgnoreCase))
                         .ToArray();
                         .ToArray();
                 }
                 }
             }
             }