# HG changeset patch # User Matti Hamalainen # Date 1558354268 -10800 # Node ID 878d2a772fd6b4d0c03826acdc62915fdea25d72 # Parent 25324e33fc78c335b355ba8f717bf15392d72e86 Add new $galExifConversions field, a boolean to distinguish unique and non-unique metadata fields. diff -r 25324e33fc78 -r 878d2a772fd6 mgtool.php --- a/mgtool.php Mon May 20 14:06:59 2019 +0300 +++ b/mgtool.php Mon May 20 15:11:08 2019 +0300 @@ -34,23 +34,24 @@ define("GEC_TYPE" , 0); define("GEC_NAME" , 1); define("GEC_FIELDS" , 2); +define("GEC_IS_UNIQUE" , 3); $galExifConversions = [ - [ MG_STR, "caption" , "ImageDescription" ], - [ MG_STR, "copyright" , "Copyright" ], - [ MG_STR, "model" , "Model" ], - [ MG_INT, "width" , ["COMPUTED", "Width"] ], - [ MG_INT, "height" , ["COMPUTED", "Height"] ], - [ MG_DVA, "fnumber" , "FNumber" ], - [ MG_DVA, "exposure" , "ExposureTime" ], - [ MG_INT, "iso" , "ISOSpeedRatings" ], - [ MG_STR, "lensmodel" , "UndefinedTag:0xA434" ], - [ MG_DVA, "focallength" , "FocalLength" ], - [ MG_DATE, "datetime" , "DateTimeOriginal" ], - [ MG_DATE, "datetime" , "DateTimeDigitized" ], - [ MG_INT, "filesize" , "FileSize" ], - [ MG_STR, "keywords" , "keywords" ], + [ MG_STR, "caption" , "ImageDescription" , TRUE ], + [ MG_STR, "copyright" , "Copyright" , FALSE ], + [ MG_STR, "model" , "Model" , FALSE ], + [ MG_STR, "lensmodel" , "UndefinedTag:0xA434" , FALSE ], + [ MG_INT, "width" , ["COMPUTED", "Width"] , TRUE ], + [ MG_INT, "height" , ["COMPUTED", "Height"] , TRUE ], + [ MG_DVA, "fnumber" , "FNumber" , TRUE ], + [ MG_DVA, "exposure" , "ExposureTime" , TRUE ], + [ MG_INT, "iso" , "ISOSpeedRatings" , TRUE ], + [ MG_DVA, "focallength" , "FocalLength" , TRUE ], + [ MG_DATE, "datetime" , "DateTimeOriginal" , TRUE ], + [ MG_DATE, "datetime" , "DateTimeDigitized" , TRUE ], + [ MG_INT, "filesize" , "FileSize" , TRUE ], + [ MG_STR, "keywords" , "keywords" , FALSE ], ];