aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api/Controllers/RemoteImageController.cs
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-11-15 13:09:05 -0700
committercrobibero <cody@robibe.ro>2020-11-15 13:09:05 -0700
commite66d79fc0cf1a1a3554e530adfdd3fa8be6967a5 (patch)
tree109235db7bf8cca0acfb22a0e90f4733c7e0caf7 /Jellyfin.Api/Controllers/RemoteImageController.cs
parent95a2de757f8142fed4ef19b71ac2d483fa152674 (diff)
parent2f426dfc97677deffb60420078b20a7f5f03977e (diff)
Merge remote-tracking branch 'upstream/master' into http-exception
Diffstat (limited to 'Jellyfin.Api/Controllers/RemoteImageController.cs')
-rw-r--r--Jellyfin.Api/Controllers/RemoteImageController.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Jellyfin.Api/Controllers/RemoteImageController.cs b/Jellyfin.Api/Controllers/RemoteImageController.cs
index c2bfab175..5284888d8 100644
--- a/Jellyfin.Api/Controllers/RemoteImageController.cs
+++ b/Jellyfin.Api/Controllers/RemoteImageController.cs
@@ -254,7 +254,7 @@ namespace Jellyfin.Api.Controllers
throw new ResourceNotFoundException(nameof(response.Content.Headers.ContentType));
}
- var ext = response.Content.Headers.ContentType.MediaType.Split('/').Last();
+ var ext = response.Content.Headers.ContentType.MediaType.Split('/')[^1];
var fullCachePath = GetFullCachePath(urlHash + "." + ext);
var fullCacheDirectory = Path.GetDirectoryName(fullCachePath) ?? throw new ResourceNotFoundException($"Provided path ({fullCachePath}) is not valid.");