diff --git a/Classes/EventListener/AddFurtherMetadataToFile.php b/Classes/EventListener/AddFurtherMetadataToFile.php
new file mode 100644
index 0000000..a7f2307
--- /dev/null
+++ b/Classes/EventListener/AddFurtherMetadataToFile.php
@@ -0,0 +1,60 @@
+
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ */
+
+use TYPO3\CMS\Core\Resource\Event\EnrichFileMetaDataEvent;
+use TYPO3\CMS\Core\Resource\FileReference;
+use TYPO3\CMS\Frontend\Resource\FileCollector;
+
+class AddFurtherMetadataToFile
+{
+ /**
+ * @var FileCollector
+ */
+ private $fileCollector;
+
+ public function __construct(FileCollector $fileCollector)
+ {
+ $this->fileCollector = $fileCollector;
+ }
+
+ public function __invoke(EnrichFileMetaDataEvent $event): void
+ {
+ $record = $event->getRecord();
+
+ $record['poster'] = $this->resolvePoster($record);
+
+ $event->setRecord($record);
+ }
+
+ private function resolvePoster(array $record): ?FileReference
+ {
+ $this->fileCollector->addFilesFromRelation(
+ 'sys_file_metadata',
+ 'poster',
+ $record
+ );
+
+ $files = $this->fileCollector->getFiles();
+ return $files[0] ?? null;
+ }
+}
diff --git a/Configuration/Services.yaml b/Configuration/Services.yaml
index 87d99d8..633e48d 100644
--- a/Configuration/Services.yaml
+++ b/Configuration/Services.yaml
@@ -28,3 +28,12 @@ services:
iconIdentifier: 'content-widget-rss'
height: 'medium'
width: 'small'
+
+ # Events
+ DanielSiepmann\DsSite\EventListener\AddFurtherMetadataToFile:
+ public: true
+ tags:
+ - name: event.listener
+ identifier: 'AddFurtherMetadataToFile'
+ event: TYPO3\CMS\Core\Resource\Event\EnrichFileMetaDataEvent
+ after: 'languageAndWorkspaceOverlay'
diff --git a/Configuration/TCA/Overrides/sys_file_metadata.php b/Configuration/TCA/Overrides/sys_file_metadata.php
new file mode 100644
index 0000000..db7c127
--- /dev/null
+++ b/Configuration/TCA/Overrides/sys_file_metadata.php
@@ -0,0 +1,35 @@
+
+ [
+ 'youtube' => [
+ 'label' => $languagePath . 'youtube',
+ 'config' => [
+ 'type' => 'input',
+ 'eval' => 'trim',
+ ],
+ ],
+ 'poster' => [
+ 'label' => $languagePath . 'poster',
+ 'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
+ 'poster',
+ [
+ 'maxitems' => 1,
+ ],
+ $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
+ ),
+ ],
+ ],
+ ]);
+
+ \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
+ $tableName,
+ 'youtube, poster',
+ '',
+ 'after:title'
+ );
+})('ds_site', 'sys_file_metadata');
diff --git a/Configuration/TCA/Overrides/tt_content.php b/Configuration/TCA/Overrides/tt_content.php
index 766bd79..ba097a9 100644
--- a/Configuration/TCA/Overrides/tt_content.php
+++ b/Configuration/TCA/Overrides/tt_content.php
@@ -1,7 +1,7 @@
[
$ctype => [
'showitem' => implode(',', [
diff --git a/Configuration/TCA/Overrides/tt_content_image.php b/Configuration/TCA/Overrides/tt_content_image.php
index f51d168..89af2a0 100644
--- a/Configuration/TCA/Overrides/tt_content_image.php
+++ b/Configuration/TCA/Overrides/tt_content_image.php
@@ -1,7 +1,7 @@
[
$ctype => [
'showitem' => implode(',', [
diff --git a/Resources/Private/Language/locallang_tca.xlf b/Resources/Private/Language/locallang_tca.xlf
index a0d3941..109f2f1 100644
--- a/Resources/Private/Language/locallang_tca.xlf
+++ b/Resources/Private/Language/locallang_tca.xlf
@@ -12,6 +12,13 @@
+
+
+
+
+
+
+