From 0d335082c8cf541637f4bcae1dc0399f649d24ce Mon Sep 17 00:00:00 2001 From: Cody Robibero Date: Mon, 10 Jan 2022 10:59:32 -0700 Subject: [PATCH] suggestions from review --- .../Library/SplashscreenPostScanTask.cs | 4 ++-- Jellyfin.Api/Controllers/ImageController.cs | 2 +- Jellyfin.Drawing.Skia/SplashscreenBuilder.cs | 4 +--- MediaBrowser.Model/Branding/BrandingOptions.cs | 6 ------ 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/Emby.Server.Implementations/Library/SplashscreenPostScanTask.cs b/Emby.Server.Implementations/Library/SplashscreenPostScanTask.cs index aed5711fa6..320685b1f1 100644 --- a/Emby.Server.Implementations/Library/SplashscreenPostScanTask.cs +++ b/Emby.Server.Implementations/Library/SplashscreenPostScanTask.cs @@ -69,9 +69,9 @@ public class SplashscreenPostScanTask : ILibraryPostScanTask Limit = 30, // TODO max parental rating configurable MaxParentalRating = 10, - OrderBy = new ValueTuple[] + OrderBy = new[] { - new(ItemSortBy.Random, SortOrder.Ascending) + (ItemSortBy.Random, SortOrder.Ascending) }, IncludeItemTypes = new[] { BaseItemKind.Movie, BaseItemKind.Series } }); diff --git a/Jellyfin.Api/Controllers/ImageController.cs b/Jellyfin.Api/Controllers/ImageController.cs index b44a21d033..7cc526d218 100644 --- a/Jellyfin.Api/Controllers/ImageController.cs +++ b/Jellyfin.Api/Controllers/ImageController.cs @@ -1793,7 +1793,7 @@ namespace Jellyfin.Api.Controllers /// Uploads a custom splashscreen. /// /// A indicating success. - /// Sucessfully uploaded new splashscreen. + /// Successfully uploaded new splashscreen. /// Error reading MimeType from uploaded image. /// User does not have permission to upload splashscreen.. /// Error reading the image format. diff --git a/Jellyfin.Drawing.Skia/SplashscreenBuilder.cs b/Jellyfin.Drawing.Skia/SplashscreenBuilder.cs index 132c35e67c..e5fa6c2bd1 100644 --- a/Jellyfin.Drawing.Skia/SplashscreenBuilder.cs +++ b/Jellyfin.Drawing.Skia/SplashscreenBuilder.cs @@ -52,8 +52,6 @@ namespace Jellyfin.Drawing.Skia /// The created collage as a bitmap. private SKBitmap GenerateCollage(IReadOnlyList posters, IReadOnlyList backdrops) { - var random = new Random(); - var posterIndex = 0; var backdropIndex = 0; @@ -65,7 +63,7 @@ namespace Jellyfin.Drawing.Skia for (int i = 0; i < Rows; i++) { - int imageCounter = random.Next(0, 5); + int imageCounter = Random.Shared.Next(0, 5); int currentWidthPos = i * 75; int currentHeight = i * (posterHeight + Spacing); diff --git a/MediaBrowser.Model/Branding/BrandingOptions.cs b/MediaBrowser.Model/Branding/BrandingOptions.cs index 01db708856..cc42c1718a 100644 --- a/MediaBrowser.Model/Branding/BrandingOptions.cs +++ b/MediaBrowser.Model/Branding/BrandingOptions.cs @@ -29,10 +29,4 @@ public class BrandingOptions /// [JsonIgnore] public string? SplashscreenLocation { get; set; } - - /// - /// Gets the splashscreen url. - /// - [XmlIgnore] - public string SplashscreenUrl => "/Branding/Splashscreen"; }