summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2024-01-28 14:52:50 +0300
committerAndrew Dolgov <[email protected]>2024-01-28 14:52:50 +0300
commit561d0268a69077e458d353ebaf00e9460df3fac4 (patch)
tree7169dd01c0aaa8ea5e77aa796368538226a24866
parent83bb62633d0f4c129eb5ab69a45365ab5fda3d46 (diff)
create an instance of FeedEnclosure for synthetic youtube enclosuresHEADmaster
-rw-r--r--init.php6
1 files changed, 5 insertions, 1 deletions
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;
}