mirror of
https://github.com/revenz/FileFlowsPlugins.git
synced 2026-01-06 05:50:32 -06:00
FF-1257 - added extra exif to read the date an image was taken
This commit is contained in:
@@ -142,11 +142,7 @@ public abstract class ImageBaseNode:Node
|
||||
|
||||
if (dateTaken != null)
|
||||
{
|
||||
variables.AddOrUpdate("img.DateTaken.Value", dateTaken.Value);
|
||||
variables.AddOrUpdate("img.DateTaken.Year", dateTaken.Value.Year);
|
||||
variables.AddOrUpdate("img.DateTaken.Month", dateTaken.Value.Month);
|
||||
variables.AddOrUpdate("img.DateTaken.Day", dateTaken.Value.Day);
|
||||
variables.AddOrUpdate("img.DateTaken.FulLDate", dateTaken.Value.ToString("yyyy-MM-dd"));
|
||||
variables.AddOrUpdate("img.DateTaken", dateTaken.Value);
|
||||
}
|
||||
|
||||
var metadata = new Dictionary<string, object>();
|
||||
|
||||
@@ -24,8 +24,7 @@ public class ImageFile : ImageBaseNode
|
||||
|
||||
{ "img.DateTaken.Year", 2020 },
|
||||
{ "img.DateTaken.Month", 4 },
|
||||
{ "img.DateTaken.Day", 20 },
|
||||
{ "img.DateTaken.FulLDate", "2020-04-20" }
|
||||
{ "img.DateTaken.Day", 20 }
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -306,7 +306,7 @@ public class ImageNodesTests
|
||||
var node = new ImageFile();
|
||||
var result = node.Execute(args);
|
||||
Assert.AreEqual(1, result);
|
||||
if(node.Variables.TryGetValue("img.DateTaken.Value", out object oDate) == false)
|
||||
if(node.Variables.TryGetValue("img.DateTaken", out object oDate) == false)
|
||||
Assert.Fail("Failed to get date time");
|
||||
|
||||
if(oDate is DateTime dt == false)
|
||||
|
||||
Reference in New Issue
Block a user