mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-15 15:48:03 +00:00
Merge pull request #8511 from Bond-009/isnull
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user