|
|
@ -570,8 +570,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
|
blur,
|
|
|
|
blur,
|
|
|
|
backgroundColor,
|
|
|
|
backgroundColor,
|
|
|
|
foregroundLayer,
|
|
|
|
foregroundLayer,
|
|
|
|
item,
|
|
|
|
item)
|
|
|
|
Request.Method.Equals(HttpMethods.Head, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -654,8 +653,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
|
blur,
|
|
|
|
blur,
|
|
|
|
backgroundColor,
|
|
|
|
backgroundColor,
|
|
|
|
foregroundLayer,
|
|
|
|
foregroundLayer,
|
|
|
|
item,
|
|
|
|
item)
|
|
|
|
Request.Method.Equals(HttpMethods.Head, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -738,8 +736,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
|
blur,
|
|
|
|
blur,
|
|
|
|
backgroundColor,
|
|
|
|
backgroundColor,
|
|
|
|
foregroundLayer,
|
|
|
|
foregroundLayer,
|
|
|
|
item,
|
|
|
|
item)
|
|
|
|
Request.Method.Equals(HttpMethods.Head, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -822,8 +819,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
|
blur,
|
|
|
|
blur,
|
|
|
|
backgroundColor,
|
|
|
|
backgroundColor,
|
|
|
|
foregroundLayer,
|
|
|
|
foregroundLayer,
|
|
|
|
item,
|
|
|
|
item)
|
|
|
|
Request.Method.Equals(HttpMethods.Head, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -906,8 +902,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
|
blur,
|
|
|
|
blur,
|
|
|
|
backgroundColor,
|
|
|
|
backgroundColor,
|
|
|
|
foregroundLayer,
|
|
|
|
foregroundLayer,
|
|
|
|
item,
|
|
|
|
item)
|
|
|
|
Request.Method.Equals(HttpMethods.Head, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -990,8 +985,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
|
blur,
|
|
|
|
blur,
|
|
|
|
backgroundColor,
|
|
|
|
backgroundColor,
|
|
|
|
foregroundLayer,
|
|
|
|
foregroundLayer,
|
|
|
|
item,
|
|
|
|
item)
|
|
|
|
Request.Method.Equals(HttpMethods.Head, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1074,8 +1068,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
|
blur,
|
|
|
|
blur,
|
|
|
|
backgroundColor,
|
|
|
|
backgroundColor,
|
|
|
|
foregroundLayer,
|
|
|
|
foregroundLayer,
|
|
|
|
item,
|
|
|
|
item)
|
|
|
|
Request.Method.Equals(HttpMethods.Head, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1158,8 +1151,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
|
blur,
|
|
|
|
blur,
|
|
|
|
backgroundColor,
|
|
|
|
backgroundColor,
|
|
|
|
foregroundLayer,
|
|
|
|
foregroundLayer,
|
|
|
|
item,
|
|
|
|
item)
|
|
|
|
Request.Method.Equals(HttpMethods.Head, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1242,8 +1234,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
|
blur,
|
|
|
|
blur,
|
|
|
|
backgroundColor,
|
|
|
|
backgroundColor,
|
|
|
|
foregroundLayer,
|
|
|
|
foregroundLayer,
|
|
|
|
item,
|
|
|
|
item)
|
|
|
|
Request.Method.Equals(HttpMethods.Head, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1326,8 +1317,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
|
blur,
|
|
|
|
blur,
|
|
|
|
backgroundColor,
|
|
|
|
backgroundColor,
|
|
|
|
foregroundLayer,
|
|
|
|
foregroundLayer,
|
|
|
|
item,
|
|
|
|
item)
|
|
|
|
Request.Method.Equals(HttpMethods.Head, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1410,8 +1400,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
|
blur,
|
|
|
|
blur,
|
|
|
|
backgroundColor,
|
|
|
|
backgroundColor,
|
|
|
|
foregroundLayer,
|
|
|
|
foregroundLayer,
|
|
|
|
item,
|
|
|
|
item)
|
|
|
|
Request.Method.Equals(HttpMethods.Head, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1494,8 +1483,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
|
blur,
|
|
|
|
blur,
|
|
|
|
backgroundColor,
|
|
|
|
backgroundColor,
|
|
|
|
foregroundLayer,
|
|
|
|
foregroundLayer,
|
|
|
|
item,
|
|
|
|
item)
|
|
|
|
Request.Method.Equals(HttpMethods.Head, StringComparison.OrdinalIgnoreCase))
|
|
|
|
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1596,7 +1584,6 @@ namespace Jellyfin.Api.Controllers
|
|
|
|
backgroundColor,
|
|
|
|
backgroundColor,
|
|
|
|
foregroundLayer,
|
|
|
|
foregroundLayer,
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
Request.Method.Equals(HttpMethods.Head, StringComparison.OrdinalIgnoreCase),
|
|
|
|
|
|
|
|
info)
|
|
|
|
info)
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1698,7 +1685,6 @@ namespace Jellyfin.Api.Controllers
|
|
|
|
backgroundColor,
|
|
|
|
backgroundColor,
|
|
|
|
foregroundLayer,
|
|
|
|
foregroundLayer,
|
|
|
|
null,
|
|
|
|
null,
|
|
|
|
Request.Method.Equals(HttpMethods.Head, StringComparison.OrdinalIgnoreCase),
|
|
|
|
|
|
|
|
info)
|
|
|
|
info)
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
.ConfigureAwait(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1907,7 +1893,6 @@ namespace Jellyfin.Api.Controllers
|
|
|
|
string? backgroundColor,
|
|
|
|
string? backgroundColor,
|
|
|
|
string? foregroundLayer,
|
|
|
|
string? foregroundLayer,
|
|
|
|
BaseItem? item,
|
|
|
|
BaseItem? item,
|
|
|
|
bool isHeadRequest,
|
|
|
|
|
|
|
|
ItemImageInfo? imageInfo = null)
|
|
|
|
ItemImageInfo? imageInfo = null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (percentPlayed.HasValue)
|
|
|
|
if (percentPlayed.HasValue)
|
|
|
@ -1988,8 +1973,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
|
return await GetImageResult(
|
|
|
|
return await GetImageResult(
|
|
|
|
options,
|
|
|
|
options,
|
|
|
|
cacheDuration,
|
|
|
|
cacheDuration,
|
|
|
|
responseHeaders,
|
|
|
|
responseHeaders).ConfigureAwait(false);
|
|
|
|
isHeadRequest).ConfigureAwait(false);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private ImageFormat[] GetOutputFormats(ImageFormat? format)
|
|
|
|
private ImageFormat[] GetOutputFormats(ImageFormat? format)
|
|
|
@ -2068,8 +2052,7 @@ namespace Jellyfin.Api.Controllers
|
|
|
|
private async Task<ActionResult> GetImageResult(
|
|
|
|
private async Task<ActionResult> GetImageResult(
|
|
|
|
ImageProcessingOptions imageProcessingOptions,
|
|
|
|
ImageProcessingOptions imageProcessingOptions,
|
|
|
|
TimeSpan? cacheDuration,
|
|
|
|
TimeSpan? cacheDuration,
|
|
|
|
IDictionary<string, string> headers,
|
|
|
|
IDictionary<string, string> headers)
|
|
|
|
bool isHeadRequest)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var (imagePath, imageContentType, dateImageModified) = await _imageProcessor.ProcessImage(imageProcessingOptions).ConfigureAwait(false);
|
|
|
|
var (imagePath, imageContentType, dateImageModified) = await _imageProcessor.ProcessImage(imageProcessingOptions).ConfigureAwait(false);
|
|
|
|
|
|
|
|
|
|
|
@ -2120,12 +2103,6 @@ namespace Jellyfin.Api.Controllers
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// if the request is a head request, return a NoContent result with the same headers as it would with a GET request
|
|
|
|
|
|
|
|
if (isHeadRequest)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return NoContent();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return PhysicalFile(imagePath, imageContentType ?? MediaTypeNames.Text.Plain);
|
|
|
|
return PhysicalFile(imagePath, imageContentType ?? MediaTypeNames.Text.Plain);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|