Skip to content
Snippets Groups Projects
Commit 65258e2d authored by Michael Kessler's avatar Michael Kessler
Browse files

[TASK] Use prefix when using a channel id to prevent mixing up with video id

parent 0d77cf27
No related branches found
No related tags found
No related merge requests found
......@@ -109,12 +109,13 @@ class VimeoService implements LoggerAwareInterface {
$showcaseId = preg_split('/\//', $vimeoId)[1];
$response['items'] = $this->addVideoIdsToResponse($this->getShowcaseVideos((int) $showcaseId));
$response['kind'] = 'showcase';
} else if (is_numeric($vimeoId)) {
} else if (strpos($vimeoId, 'channel') === 0) {
$channelId = preg_split('/\//', $vimeoId)[1];
$response['items'] = $this->addVideoIdsToResponse($this->getChannelVideos($channelId));
$response['kind'] = 'channel';
} else {
$response['items'] = $this->addVideoIdsToResponse($this->getVideo((int) $vimeoId));
$response['kind'] = 'video';
} else {
$response['items'] = $this->addVideoIdsToResponse($this->getChannelVideos($vimeoId));
$response['kind'] = 'channel';
}
if (!$disableVimeoCache) {
......
......@@ -102,8 +102,8 @@
<target><![CDATA[Video-ID (https://vimeo.com/%VIDEO_ID%), Kanal-Name (https://vimeo.com/channels/%KANAL_NAME%) oder Showcase (showcase/%SHOWCASE_ID%)]]></target>
</trans-unit>
<trans-unit id="flexform.id.description" approved="yes">
<source><![CDATA[Example inputs - Single video: 123456789 | Channel: exampleUser1 | Showcase: showcase/987645]]></source>
<target><![CDATA[Beispieleingaben - Einzelnes Video: 123456789 | Kanal: exampleUser1 | Showcase: showcase/987645]]></target>
<source><![CDATA[Example inputs - Single video: 123456789 | Channel: channel/channelname | Showcase: showcase/987645]]></source>
<target><![CDATA[Beispieleingaben - Einzelnes Video: 123456789 | Kanal: channel/kanalname | Showcase: showcase/987645]]></target>
</trans-unit>
<trans-unit id="flexform.layout" approved="yes">
<source><![CDATA[Layout Style]]></source>
......
......@@ -45,7 +45,7 @@
<source><![CDATA[Playlist]]></source>
</trans-unit>
<trans-unit id="flexform.id.description">
<source><![CDATA[Example inputs - Single video: 123456789 | Channel: exampleUser1 | Showcase: showcase/987645]]></source>
<source><![CDATA[Example inputs - Single video: 123456789 | Channel: channel/channelname | Showcase: showcase/987645]]></source>
</trans-unit>
<trans-unit id="flexform.maxResults">
<source><![CDATA[Maximum Amount]]></source>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment