aboutsummaryrefslogtreecommitdiff
path: root/Emby.Drawing/ImageProcessor.cs
diff options
context:
space:
mode:
authordkanada <dkanada@users.noreply.github.com>2020-04-23 18:43:37 +0900
committerGitHub <noreply@github.com>2020-04-23 18:43:37 +0900
commitaa6d52277dfbc074016d7623f114325a5edc3cbe (patch)
tree3dae865e35e3cd026e188706b5eec739cb33bf7b /Emby.Drawing/ImageProcessor.cs
parent97e383d108a4adb7e57c13d67f1d36bd1b5ce7b5 (diff)
parent118f30059c11cf43d9780c8e0328423e35b44b76 (diff)
Merge pull request #2771 from Bond-009/nullable4
Enable nullabe reference types for Emby.Drawing and Jellyfin.Drawing.Skia
Diffstat (limited to 'Emby.Drawing/ImageProcessor.cs')
-rw-r--r--Emby.Drawing/ImageProcessor.cs22
1 files changed, 5 insertions, 17 deletions
diff --git a/Emby.Drawing/ImageProcessor.cs b/Emby.Drawing/ImageProcessor.cs
index ba14b4dca..0b3bbe29e 100644
--- a/Emby.Drawing/ImageProcessor.cs
+++ b/Emby.Drawing/ImageProcessor.cs
@@ -116,11 +116,6 @@ namespace Emby.Drawing
/// <inheritdoc />
public async Task<(string path, string mimeType, DateTime dateModified)> ProcessImage(ImageProcessingOptions options)
{
- if (options == null)
- {
- throw new ArgumentNullException(nameof(options));
- }
-
ItemImageInfo originalImage = options.Image;
BaseItem item = options.Item;
@@ -325,19 +320,12 @@ namespace Emby.Drawing
/// <inheritdoc />
public string GetImageCacheTag(BaseItem item, ChapterInfo chapter)
{
- try
+ return GetImageCacheTag(item, new ItemImageInfo
{
- return GetImageCacheTag(item, new ItemImageInfo
- {
- Path = chapter.ImagePath,
- Type = ImageType.Chapter,
- DateModified = chapter.ImageDateModified
- });
- }
- catch
- {
- return null;
- }
+ Path = chapter.ImagePath,
+ Type = ImageType.Chapter,
+ DateModified = chapter.ImageDateModified
+ });
}
private async Task<(string path, DateTime dateModified)> GetSupportedImage(string originalImagePath, DateTime dateModified)