diff --git a/Command/ImportYouTubeExternalPlayerCommand.php b/Command/ImportYouTubeExternalPlayerCommand.php index 69a7384..9823615 100644 --- a/Command/ImportYouTubeExternalPlayerCommand.php +++ b/Command/ImportYouTubeExternalPlayerCommand.php @@ -60,6 +60,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int $progressBar->advance(); ++$count; + if (!empty($multimediaObject->external())) { + continue; + } + $this->updateMultimediaObject($multimediaObject); if (0 == $count % 50) { @@ -88,6 +92,7 @@ private function updateMultimediaObject(MultimediaObject $multimediaObject): voi $externalLink = 'https://www.youtube.com/embed/'.$multimediaObject->getProperty('youtube_import_id'); $externalMedia = $this->createExternalMedia($externalLink); $multimediaObject->addExternal($externalMedia); + $multimediaObject->setExternalType(); } private function createExternalMedia(string $externalLink): MediaInterface