aboutsummaryrefslogtreecommitdiff
path: root/Emby.Drawing/ImageProcessor.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Drawing/ImageProcessor.cs')
-rw-r--r--Emby.Drawing/ImageProcessor.cs19
1 files changed, 4 insertions, 15 deletions
diff --git a/Emby.Drawing/ImageProcessor.cs b/Emby.Drawing/ImageProcessor.cs
index 11256dafd..5a49e876a 100644
--- a/Emby.Drawing/ImageProcessor.cs
+++ b/Emby.Drawing/ImageProcessor.cs
@@ -436,7 +436,7 @@ namespace Emby.Drawing
/// <inheritdoc />
public string? GetImageCacheTag(User user)
{
- if (user.ProfileImage == null)
+ if (user.ProfileImage is null)
{
return null;
}
@@ -503,20 +503,9 @@ namespace Emby.Drawing
/// </exception>
public string GetCachePath(string path, string uniqueName, string fileExtension)
{
- if (string.IsNullOrEmpty(path))
- {
- throw new ArgumentNullException(nameof(path));
- }
-
- if (string.IsNullOrEmpty(uniqueName))
- {
- throw new ArgumentNullException(nameof(uniqueName));
- }
-
- if (string.IsNullOrEmpty(fileExtension))
- {
- throw new ArgumentNullException(nameof(fileExtension));
- }
+ ArgumentException.ThrowIfNullOrEmpty(path);
+ ArgumentException.ThrowIfNullOrEmpty(uniqueName);
+ ArgumentException.ThrowIfNullOrEmpty(fileExtension);
var filename = uniqueName.GetMD5() + fileExtension;