Skip to content

Commit

Permalink
Fix XMP parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Webreaper committed Mar 8, 2024
1 parent 83febf9 commit 2a5596e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Damselfly.Core/Services/MetaDataService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -231,13 +231,13 @@ private void ReadXMPData(XmpDirectory xmpDirectory, Image image)

if( image.MetaData.DateTaken == DateTime.MinValue )
{
if( DateTime.TryParse(nvps["exif:DateTimeOriginal"], out var dateTime) )
if( nvps.ContainsKey("exif:DateTimeOriginal") && DateTime.TryParse(nvps["exif:DateTimeOriginal"], out var dateTime) )
image.MetaData.DateTaken = dateTime;
}
if( string.IsNullOrEmpty(image.MetaData.Description) )
if( string.IsNullOrEmpty(image.MetaData.Description) && nvps.ContainsKey("exif:Description"))
image.MetaData.Description = nvps["exif:Description"];

if( string.IsNullOrEmpty(image.MetaData.Caption) )
if( string.IsNullOrEmpty(image.MetaData.Caption) && nvps.ContainsKey("exif:Caption") )
image.MetaData.Caption = nvps["exif:Caption"];
}
catch ( Exception ex )
Expand Down
2 changes: 1 addition & 1 deletion Damselfly.Web.Client/wwwroot/version.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
const CACHE_VERSION='4.1.0-20240308093934'
const CACHE_VERSION='4.1.0-20240308104114'

0 comments on commit 2a5596e

Please sign in to comment.