aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2022-01-10 10:59:32 -0700
committerCody Robibero <cody@robibe.ro>2022-01-10 10:59:32 -0700
commit0d335082c8cf541637f4bcae1dc0399f649d24ce (patch)
treed86c0ca71435f543986a4a4e6bac2f4734d565a8
parent6520ad03f055af5127b44d4afe310f0786bc6275 (diff)
suggestions from review
-rw-r--r--Emby.Server.Implementations/Library/SplashscreenPostScanTask.cs4
-rw-r--r--Jellyfin.Api/Controllers/ImageController.cs2
-rw-r--r--Jellyfin.Drawing.Skia/SplashscreenBuilder.cs4
-rw-r--r--MediaBrowser.Model/Branding/BrandingOptions.cs6
4 files changed, 4 insertions, 12 deletions
diff --git a/Emby.Server.Implementations/Library/SplashscreenPostScanTask.cs b/Emby.Server.Implementations/Library/SplashscreenPostScanTask.cs
index aed5711fa..320685b1f 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<string, SortOrder>[]
+ 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 b44a21d03..7cc526d21 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.
/// </summary>
/// <returns>A <see cref="NoContentResult"/> indicating success.</returns>
- /// <response code="204">Sucessfully uploaded new splashscreen.</response>
+ /// <response code="204">Successfully uploaded new splashscreen.</response>
/// <response code="400">Error reading MimeType from uploaded image.</response>
/// <response code="403">User does not have permission to upload splashscreen..</response>
/// <exception cref="ArgumentException">Error reading the image format.</exception>
diff --git a/Jellyfin.Drawing.Skia/SplashscreenBuilder.cs b/Jellyfin.Drawing.Skia/SplashscreenBuilder.cs
index 132c35e67..e5fa6c2bd 100644
--- a/Jellyfin.Drawing.Skia/SplashscreenBuilder.cs
+++ b/Jellyfin.Drawing.Skia/SplashscreenBuilder.cs
@@ -52,8 +52,6 @@ namespace Jellyfin.Drawing.Skia
/// <returns>The created collage as a bitmap.</returns>
private SKBitmap GenerateCollage(IReadOnlyList<string> posters, IReadOnlyList<string> 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 01db70885..cc42c1718 100644
--- a/MediaBrowser.Model/Branding/BrandingOptions.cs
+++ b/MediaBrowser.Model/Branding/BrandingOptions.cs
@@ -29,10 +29,4 @@ public class BrandingOptions
/// </remarks>
[JsonIgnore]
public string? SplashscreenLocation { get; set; }
-
- /// <summary>
- /// Gets the splashscreen url.
- /// </summary>
- [XmlIgnore]
- public string SplashscreenUrl => "/Branding/Splashscreen";
}