From a0d78504b9d7f735b0cbd55a753a7a366c6a69f0 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Sun, 22 Oct 2023 12:25:00 -0700 Subject: [PATCH] tw: fix lp return status Signed-off-by: Varun Patil --- lib/Db/TimelineWrite.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Db/TimelineWrite.php b/lib/Db/TimelineWrite.php index ff871305..ce1c8ccb 100644 --- a/lib/Db/TimelineWrite.php +++ b/lib/Db/TimelineWrite.php @@ -98,12 +98,12 @@ class TimelineWrite // Hand off if Live Photo video part if ($isvideo && $this->livePhoto->isVideoPart($exif)) { - $this->livePhoto->processVideoPart($file, $exif); - - return true; + return $this->livePhoto->processVideoPart($file, $exif); } - // Delete video part if it is no longer valid + // If control reaches here, it's not a Live Photo video part + // But if prevRow exists and mapcluster is not set, it *was* a live video part + // In this case delete that entry (very rare edge case) if ($prevRow && !\array_key_exists('mapcluster', $prevRow)) { $this->livePhoto->deleteVideoPart($file); $prevRow = null;