takeout: keep TrackCreateDate

Signed-off-by: Varun Patil <varunpatil@ucla.edu>
pull/563/head
Varun Patil 2023-03-27 11:57:44 -07:00
parent 642816f4b9
commit 7faa4afb1e
1 changed files with 6 additions and 0 deletions

View File

@ -245,6 +245,12 @@ class MigrateGoogleTakeout extends Command
$txf = array_filter($txf, function ($value, $key) use ($exif) {
return !isset($exif[$key]);
}, ARRAY_FILTER_USE_BOTH);
// Videos may not have DateTimeOriginal but have TrackCreateDate,
// in that case do not override it
if (isset($exif['TrackCreateDate'])) {
unset($txf['DateTimeOriginal']);
}
}
// Special case: if $txf has both GPSLatitude and GPSLongitude,