This commit is contained in:
2019-09-29 07:07:05 -07:00
parent 3695583eb6
commit 3481873653
5 changed files with 24 additions and 4 deletions

View File

@@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file.
## [0.4.1] ## [0.4.1]
- Better delimiter support - Better delimiter support
- %LENS tag
## [0.4.0] ## [0.4.0]
- Initial repo version - Initial repo version

View File

@@ -20,6 +20,7 @@
**%DUR** Video Duration (formatted) **%DUR** Video Duration (formatted)
**%SW** Software (formatted) **%SW** Software (formatted)
**%MODEL** Digital Camera Model **%MODEL** Digital Camera Model
**%LENS** Lens (formatted)
**%PLACE** Formatted location (from GPS coordinates) **%PLACE** Formatted location (from GPS coordinates)
## Screenshots ## Screenshots

Binary file not shown.

View File

@@ -25,9 +25,10 @@ $p['vfiletypes'] = array("mov","mp4","m4v");
$p['screenshot_dims'] = array(320,640,750,828,1125,1242); $p['screenshot_dims'] = array(320,640,750,828,1125,1242);
$p['delimiters'] = array(" ","_","-","+"); $p['delimiters'] = array(" ","_","-","+");
// Enable this option to verify newnames against those made with a prior version of rollup // Debug options
$p['debug_verify_names'] = 0; $p['debug_verify_names'] = 0; // Verify newnames against those made with a prior version of rollup
$p['debug_lens'] = 0; // Output raw lens data to verify formatting
// No files dragged // No files dragged
@@ -119,6 +120,7 @@ foreach ($files as $file) {
$z['%DUR'] = formatDuration($e); $z['%DUR'] = formatDuration($e);
$z['%SW'] = formatSoftware($e,$p); $z['%SW'] = formatSoftware($e,$p);
$z['%MODEL'] = formatModel($e); $z['%MODEL'] = formatModel($e);
$z['%LENS'] = formatLens($e);
$z['%PLACE'] = formatPlace($e,$p); $z['%PLACE'] = formatPlace($e,$p);
if (in_array($ext,$p['pfiletypes'])) { if (in_array($ext,$p['pfiletypes'])) {
@@ -161,6 +163,8 @@ foreach ($files as $file) {
} }
} }
if ($p['debug_lens']) { echo "\n".@$e['LensModel']."\n".@$e['FocalLength']."\n"; }
echo updateProgress($i,count($files)); echo updateProgress($i,count($files));
$i++; $i++;

View File

@@ -1,5 +1,19 @@
<?php <?php
function formatLens($e) {
if (!@$e['FocalLength'] || !@$e['FocalLength'] == "0.0 mm") { return ""; }
$fl = str_replace(" mm","",$e['FocalLength']);
if ($fl < 10) {
// this is a micro lens, perform fl conversion
$fl = $fl*9;
}
$string = "Wide";
if ($fl > 25) { $string = "Normal"; }
if ($fl > 50) { $string = "Tele"; }
if (strpos(@$e['LensModel']," front ") != false) { $string = "Front"; }
return $string;
}
function formatDateTime($e) { function formatDateTime($e) {
if (@$e['DateTimeOriginal']) { if (@$e['DateTimeOriginal']) {
$dto = $e['DateTimeOriginal']; $dto = $e['DateTimeOriginal'];