#38: Modified the way the metadata upgrade page works - which now does a "re-analyse" the same way as it does an "analyse"

This commit is contained in:
Andy Heathershaw
2017-09-17 16:04:07 +01:00
parent 010e847835
commit 150f0a4966
8 changed files with 124 additions and 53 deletions
+2 -2
View File
@@ -50,7 +50,7 @@ class PhotoService
$this->themeHelper = new ThemeHelper();
}
public function analyse($queueToken)
public function analyse($queueToken, $isReanalyse = false)
{
$queuePath = FileHelper::getQueuePath($queueToken);
$photoFile = join(DIRECTORY_SEPARATOR, [$queuePath, $this->photo->storage_file_name]);
@@ -85,7 +85,7 @@ class PhotoService
// If Exif data contains an Orientation, ensure we rotate the original image as such (providing we don't
// currently have a metadata version - i.e. it hasn't been read and rotated already before)
if ($isExifDataFound && isset($exifData['Orientation']) && is_null($this->photo->metadata_version))
if ($isExifDataFound && isset($exifData['Orientation']) && !$isReanalyse)
{
switch ($exifData['Orientation'])
{