Prevent multiple videos from Peertube
This commit is contained in:
parent
f3b27dc789
commit
79ec2cbc6d
1 changed files with 2 additions and 1 deletions
|
@ -2684,7 +2684,8 @@ class Item
|
||||||
{
|
{
|
||||||
$leading = '';
|
$leading = '';
|
||||||
$trailing = '';
|
$trailing = '';
|
||||||
foreach (Post\Media::getByURIId($item['uri-id'], [Post\Media::AUDIO, Post\Media::VIDEO,
|
// currently deactivated the request for Post\Media::VIDEO since it creates mutliple videos from Peertube
|
||||||
|
foreach (Post\Media::getByURIId($item['uri-id'], [Post\Media::AUDIO,
|
||||||
Post\Media::DOCUMENT, Post\Media::TORRENT, Post\Media::UNKNOWN]) as $attachment) {
|
Post\Media::DOCUMENT, Post\Media::TORRENT, Post\Media::UNKNOWN]) as $attachment) {
|
||||||
if (in_array($attachment['type'], [Post\Media::AUDIO, Post\Media::VIDEO]) && strpos($item['body'], $attachment['url'])) {
|
if (in_array($attachment['type'], [Post\Media::AUDIO, Post\Media::VIDEO]) && strpos($item['body'], $attachment['url'])) {
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue