aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/ImageByNameController.cs
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-06-27 10:50:44 -0600
committercrobibero <cody@robibe.ro>2020-06-27 10:50:44 -0600
commit73bcda7eac6d0785745179fe4b7f58b6bc4ec488 (patch)
treed1d6841d78432b95f1e2342e5632d5feb75ae1ee /Jellyfin.Api/Controllers/ImageByNameController.cs
parent90c01327aa3ea52a2b9a47f00ede9d887399e3d9 (diff)
Make all optional strings nullable
Diffstat (limited to 'Jellyfin.Api/Controllers/ImageByNameController.cs')
-rw-r--r--Jellyfin.Api/Controllers/ImageByNameController.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/Jellyfin.Api/Controllers/ImageByNameController.cs b/Jellyfin.Api/Controllers/ImageByNameController.cs
index 4800c0608..5244c35b8 100644
--- a/Jellyfin.Api/Controllers/ImageByNameController.cs
+++ b/Jellyfin.Api/Controllers/ImageByNameController.cs
@@ -64,7 +64,7 @@ namespace Jellyfin.Api.Controllers
[Produces(MediaTypeNames.Application.Octet)]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
- public ActionResult<FileStreamResult> GetGeneralImage([FromRoute] string name, [FromRoute] string type)
+ public ActionResult<FileStreamResult> GetGeneralImage([FromRoute] string? name, [FromRoute] string? type)
{
var filename = string.Equals(type, "primary", StringComparison.OrdinalIgnoreCase)
? "folder"
@@ -110,8 +110,8 @@ namespace Jellyfin.Api.Controllers
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public ActionResult<FileStreamResult> GetRatingImage(
- [FromRoute] string theme,
- [FromRoute] string name)
+ [FromRoute] string? theme,
+ [FromRoute] string? name)
{
return GetImageFile(_applicationPaths.RatingsPath, theme, name);
}
@@ -143,8 +143,8 @@ namespace Jellyfin.Api.Controllers
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public ActionResult<FileStreamResult> GetMediaInfoImage(
- [FromRoute] string theme,
- [FromRoute] string name)
+ [FromRoute] string? theme,
+ [FromRoute] string? name)
{
return GetImageFile(_applicationPaths.MediaInfoImagesPath, theme, name);
}
@@ -156,7 +156,7 @@ namespace Jellyfin.Api.Controllers
/// <param name="theme">Theme to search.</param>
/// <param name="name">File name to search for.</param>
/// <returns>A <see cref="FileStreamResult"/> containing the image contents on success, or a <see cref="NotFoundResult"/> if the image could not be found.</returns>
- private ActionResult<FileStreamResult> GetImageFile(string basePath, string theme, string name)
+ private ActionResult<FileStreamResult> GetImageFile(string basePath, string? theme, string? name)
{
var themeFolder = Path.Combine(basePath, theme);
if (Directory.Exists(themeFolder))