diff --git a/Services/CaptionsInsertService.php b/Services/CaptionsInsertService.php index f6e7185..d5c1d24 100644 --- a/Services/CaptionsInsertService.php +++ b/Services/CaptionsInsertService.php @@ -56,7 +56,7 @@ public function uploadCaption(Youtube $youtube, MultimediaObject $multimediaObje ]); if (!empty($youtube->getCaptionUpdateError()) && 'captionExists' === $youtube->getCaptionUpdateError()->id()) { - $captionsUploaded = $this->captionsListService->findAll($account, $videoId); + $captionsUploaded = $this->captionsListService->findAll($account, $youtube->getYoutubeId()); foreach ($captionsUploaded->getItems() as $caption) { if ($caption->getSnippet()->getName() === $material->getName() && $caption->getSnippet()->getLanguage() === $material->getLanguage()) { $this->captionsDeleteService->deleteCaption($account, $youtube, [$caption->getId()]);