diff options
Diffstat (limited to 'Emby.Photos')
| -rw-r--r-- | Emby.Photos/Emby.Photos.csproj | 2 | ||||
| -rw-r--r-- | Emby.Photos/PhotoProvider.cs | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/Emby.Photos/Emby.Photos.csproj b/Emby.Photos/Emby.Photos.csproj index e1688dc6e..34bc8f32f 100644 --- a/Emby.Photos/Emby.Photos.csproj +++ b/Emby.Photos/Emby.Photos.csproj @@ -19,7 +19,7 @@ </ItemGroup> <PropertyGroup> - <TargetFramework>net6.0</TargetFramework> + <TargetFramework>net7.0</TargetFramework> <GenerateAssemblyInfo>false</GenerateAssemblyInfo> <GenerateDocumentationFile>true</GenerateDocumentationFile> </PropertyGroup> diff --git a/Emby.Photos/PhotoProvider.cs b/Emby.Photos/PhotoProvider.cs index cef82b4d6..f54066c57 100644 --- a/Emby.Photos/PhotoProvider.cs +++ b/Emby.Photos/PhotoProvider.cs @@ -27,7 +27,7 @@ namespace Emby.Photos private readonly IImageProcessor _imageProcessor; // These are causing taglib to hang - private readonly string[] _includeExtensions = new string[] { ".jpg", ".jpeg", ".png", ".tiff", ".cr2" }; + private readonly string[] _includeExtensions = new string[] { ".jpg", ".jpeg", ".png", ".tiff", ".cr2", ".webp", ".avif" }; /// <summary> /// Initializes a new instance of the <see cref="PhotoProvider" /> class. @@ -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; } |
