diff --git a/Jellyfin.Api/Controllers/ImageController.cs b/Jellyfin.Api/Controllers/ImageController.cs index d7aac9b9ce..3b2fc98e79 100644 --- a/Jellyfin.Api/Controllers/ImageController.cs +++ b/Jellyfin.Api/Controllers/ImageController.cs @@ -1764,9 +1764,7 @@ namespace Jellyfin.Api.Controllers { Image = new ItemImageInfo { - Path = splashscreenPath, - Height = 1080, - Width = 1920 + Path = splashscreenPath }, Height = height, MaxHeight = maxHeight, @@ -1791,11 +1789,15 @@ namespace Jellyfin.Api.Controllers /// Uploads a custom splashscreen. /// /// A indicating success. + /// Sucessfully uploaded new splashscreen. + /// Error reading MimeType from uploaded image. + /// User does not have permission to upload splashscreen.. /// Error reading the image format. [HttpPost("Branding/Splashscreen")] [Authorize(Policy = Policies.RequiresElevation)] [ProducesResponseType(StatusCodes.Status204NoContent)] - [ProducesResponseType(StatusCodes.Status401Unauthorized)] + [ProducesResponseType(StatusCodes.Status400BadRequest)] + [ProducesResponseType(StatusCodes.Status403Forbidden)] [AcceptsImageFile] public async Task UploadCustomSplashscreen() { @@ -1806,7 +1808,7 @@ namespace Jellyfin.Api.Controllers if (mimeType == null) { - throw new ArgumentException("Error reading mimetype from uploaded image!"); + return BadRequest("Error reading mimetype from uploaded image"); } var filePath = Path.Combine(_appPaths.DataPath, "splashscreen-upload" + MimeTypes.ToExtension(mimeType));