mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-05-31 20:24:21 -04:00
suggestions from review
This commit is contained in:
parent
6520ad03f0
commit
0d335082c8
@ -69,9 +69,9 @@ public class SplashscreenPostScanTask : ILibraryPostScanTask
|
|||||||
Limit = 30,
|
Limit = 30,
|
||||||
// TODO max parental rating configurable
|
// TODO max parental rating configurable
|
||||||
MaxParentalRating = 10,
|
MaxParentalRating = 10,
|
||||||
OrderBy = new ValueTuple<string, SortOrder>[]
|
OrderBy = new[]
|
||||||
{
|
{
|
||||||
new(ItemSortBy.Random, SortOrder.Ascending)
|
(ItemSortBy.Random, SortOrder.Ascending)
|
||||||
},
|
},
|
||||||
IncludeItemTypes = new[] { BaseItemKind.Movie, BaseItemKind.Series }
|
IncludeItemTypes = new[] { BaseItemKind.Movie, BaseItemKind.Series }
|
||||||
});
|
});
|
||||||
|
@ -1793,7 +1793,7 @@ namespace Jellyfin.Api.Controllers
|
|||||||
/// Uploads a custom splashscreen.
|
/// Uploads a custom splashscreen.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>A <see cref="NoContentResult"/> indicating success.</returns>
|
/// <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="400">Error reading MimeType from uploaded image.</response>
|
||||||
/// <response code="403">User does not have permission to upload splashscreen..</response>
|
/// <response code="403">User does not have permission to upload splashscreen..</response>
|
||||||
/// <exception cref="ArgumentException">Error reading the image format.</exception>
|
/// <exception cref="ArgumentException">Error reading the image format.</exception>
|
||||||
|
@ -52,8 +52,6 @@ namespace Jellyfin.Drawing.Skia
|
|||||||
/// <returns>The created collage as a bitmap.</returns>
|
/// <returns>The created collage as a bitmap.</returns>
|
||||||
private SKBitmap GenerateCollage(IReadOnlyList<string> posters, IReadOnlyList<string> backdrops)
|
private SKBitmap GenerateCollage(IReadOnlyList<string> posters, IReadOnlyList<string> backdrops)
|
||||||
{
|
{
|
||||||
var random = new Random();
|
|
||||||
|
|
||||||
var posterIndex = 0;
|
var posterIndex = 0;
|
||||||
var backdropIndex = 0;
|
var backdropIndex = 0;
|
||||||
|
|
||||||
@ -65,7 +63,7 @@ namespace Jellyfin.Drawing.Skia
|
|||||||
|
|
||||||
for (int i = 0; i < Rows; i++)
|
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 currentWidthPos = i * 75;
|
||||||
int currentHeight = i * (posterHeight + Spacing);
|
int currentHeight = i * (posterHeight + Spacing);
|
||||||
|
|
||||||
|
@ -29,10 +29,4 @@ public class BrandingOptions
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public string? SplashscreenLocation { get; set; }
|
public string? SplashscreenLocation { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the splashscreen url.
|
|
||||||
/// </summary>
|
|
||||||
[XmlIgnore]
|
|
||||||
public string SplashscreenUrl => "/Branding/Splashscreen";
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user