summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xplugins/af_redditimgur/init.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/af_redditimgur/init.php b/plugins/af_redditimgur/init.php
index 1bf88f02a..6eb530e27 100755
--- a/plugins/af_redditimgur/init.php
+++ b/plugins/af_redditimgur/init.php
@@ -354,6 +354,7 @@ class Af_RedditImgur extends Plugin {
$matches = array();
if (!$found && (preg_match("/youtube\.com\/v\/([\w-]+)/", $entry_href, $matches) ||
preg_match("/youtube\.com\/.*?[\&\?]v=([\w-]+)/", $entry_href, $matches) ||
+ preg_match("/youtube\.com\/embed\/([\w-]+)/", $entry_href, $matches) ||
preg_match("/youtube\.com\/watch\?v=([\w-]+)/", $entry_href, $matches) ||
preg_match("/\/\/youtu.be\/([\w-]+)/", $entry_href, $matches))) {
@@ -490,9 +491,6 @@ class Af_RedditImgur extends Plugin {
}
}
}
-
- if ($found)
- $this->remove_post_thumbnail($doc, $xpath);
}
if (!$found && $anchor && count($this->fallback_preview_urls) > 0) {
@@ -505,6 +503,9 @@ class Af_RedditImgur extends Plugin {
}
}
+ if ($found)
+ $this->remove_post_thumbnail($doc, $xpath);
+
return $found;
}