From ac6ddfc4fbf3f1e283a34ba75d6c7c7d00671587 Mon Sep 17 00:00:00 2001
From: Yassine Doghri <yassine@doghri.fr>
Date: Fri, 21 Jan 2022 17:39:29 +0000
Subject: [PATCH] style(video-clips): rename temp files to be easily identified

---
 app/Libraries/MediaClipper/VideoClipper.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/Libraries/MediaClipper/VideoClipper.php b/app/Libraries/MediaClipper/VideoClipper.php
index 3e7cadb821..e865bd1954 100644
--- a/app/Libraries/MediaClipper/VideoClipper.php
+++ b/app/Libraries/MediaClipper/VideoClipper.php
@@ -96,7 +96,7 @@ class VideoClipper
         $this->videoClipFilePath = "podcasts/{$this->episode->podcast->handle}/{$this->episode->slug}-clip-{$this->start}-to-{$this->end}-{$this->format}-{$this->theme}.mp4";
 
         // Temporary files to generate clip
-        $tempFile = tempnam(WRITEPATH . 'temp', "{$this->episode->slug}-soundbite-{$this->start}-to-{$this->end}");
+        $tempFile = tempnam(WRITEPATH . 'temp', "{$this->episode->slug}-{$this->start}-{$this->end}");
 
         if (! $tempFile) {
             throw new Exception(
@@ -105,9 +105,9 @@ class VideoClipper
         }
 
         $this->tempFileOutput = $tempFile;
-        $this->soundbiteOutput = $tempFile . '.mp3';
-        $this->subtitlesClipOutput = $tempFile . '.srt';
-        $this->videoClipBgOutput = $tempFile . '.png';
+        $this->soundbiteOutput = $tempFile . '-soundbite.mp3';
+        $this->subtitlesClipOutput = $tempFile . '-subtitle.srt';
+        $this->videoClipBgOutput = $tempFile . '-bg.png';
     }
 
     public function soundbite(): void
-- 
GitLab