From e7a7b4a40184dc3da2c83e858c820625f660e48e Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 9 Feb 2024 09:54:52 +0100 Subject: perf: switch places that always use the first getById result to getFirstNodeById Signed-off-by: Robin Appelman --- lib/private/SpeechToText/TranscriptionJob.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/private/SpeechToText') diff --git a/lib/private/SpeechToText/TranscriptionJob.php b/lib/private/SpeechToText/TranscriptionJob.php index 8921d52ecd1..083cd129657 100644 --- a/lib/private/SpeechToText/TranscriptionJob.php +++ b/lib/private/SpeechToText/TranscriptionJob.php @@ -65,7 +65,7 @@ class TranscriptionJob extends QueuedJob { try { \OC_Util::setupFS($owner); $userFolder = $this->rootFolder->getUserFolder($owner); - $file = current($userFolder->getById($fileId)); + $file = $userFolder->getFirstNodeById($fileId); if (!($file instanceof File)) { $this->logger->warning('Transcription of file ' . $fileId . ' failed. The file could not be found'); $this->eventDispatcher->dispatchTyped( -- cgit v1.2.3