From 561d0268a69077e458d353ebaf00e9460df3fac4 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 28 Jan 2024 14:52:50 +0300 Subject: create an instance of FeedEnclosure for synthetic youtube enclosures --- init.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'init.php') diff --git a/init.php b/init.php index 79b22da..c3960a0 100644 --- a/init.php +++ b/init.php @@ -154,8 +154,12 @@ class Af_Lemmy extends Plugin { /* normalize video URL for af_youtube_... plugins */ $video_url = "https://www.youtube.com/v/$vid_id"; + $enc = new FeedEnclosure(); + $enc->link = $video_url; + $enc->type = "text/html"; + /* push generated video URL to enclosures so that youtube embed plugins would deal with it later (if enabled) */ - $this->generated_enclosures[] = [$video_url, "text/html", null, null, '', '']; + $this->generated_enclosures[] = $enc; $found = 1; } -- cgit v1.2.3