aboutsummaryrefslogtreecommitdiff
path: root/Emby.Photos/PhotoProvider.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2022-12-07 16:39:40 +0100
committerGitHub <noreply@github.com>2022-12-07 16:39:40 +0100
commitf3c57e6a0ae015dc51cf548a0380d1bed33959c2 (patch)
tree1052ce5b7646e4fea7b20768213e89c0e38126ec /Emby.Photos/PhotoProvider.cs
parent681be595cea8254cbac5bbb3bdc9083c4780db21 (diff)
parent52194f56b5f07e3ae01e2fb6d121452e37d1e93f (diff)
Merge pull request #8511 from Bond-009/isnull
Diffstat (limited to 'Emby.Photos/PhotoProvider.cs')
-rw-r--r--Emby.Photos/PhotoProvider.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Emby.Photos/PhotoProvider.cs b/Emby.Photos/PhotoProvider.cs
index 16e9b18e2..f54066c57 100644
--- a/Emby.Photos/PhotoProvider.cs
+++ b/Emby.Photos/PhotoProvider.cs
@@ -49,7 +49,7 @@ namespace Emby.Photos
if (item.IsFileProtocol)
{
var file = directoryService.GetFile(item.Path);
- return file != null && file.LastWriteTimeUtc != item.DateModified;
+ return file is not null && file.LastWriteTimeUtc != item.DateModified;
}
return false;
@@ -70,20 +70,20 @@ namespace Emby.Photos
if (file.GetTag(TagTypes.TiffIFD) is IFDTag tag)
{
var structure = tag.Structure;
- if (structure != null
+ if (structure is not null
&& structure.GetEntry(0, (ushort)IFDEntryTag.ExifIFD) is SubIFDEntry exif)
{
var exifStructure = exif.Structure;
- if (exifStructure != null)
+ if (exifStructure is not null)
{
var entry = exifStructure.GetEntry(0, (ushort)ExifEntryTag.ApertureValue) as RationalIFDEntry;
- if (entry != null)
+ if (entry is not null)
{
item.Aperture = (double)entry.Value.Numerator / entry.Value.Denominator;
}
entry = exifStructure.GetEntry(0, (ushort)ExifEntryTag.ShutterSpeedValue) as RationalIFDEntry;
- if (entry != null)
+ if (entry is not null)
{
item.ShutterSpeed = (double)entry.Value.Numerator / entry.Value.Denominator;
}