af_redditimgur: relax poster image url condition for imgur a bit

master
Andrew Dolgov 8 years ago
parent 43db5b99eb
commit 49048482d8

@ -172,7 +172,7 @@ class Af_RedditImgur extends Plugin {
$source_stream = str_replace(".gifv", ".mp4", $entry->getAttribute("href")); $source_stream = str_replace(".gifv", ".mp4", $entry->getAttribute("href"));
if (strpos($source_stream, "i.imgur.com") !== FALSE) if (strpos($source_stream, "imgur.com") !== FALSE)
$poster_url = str_replace(".mp4", "h.jpg", $source_stream); $poster_url = str_replace(".mp4", "h.jpg", $source_stream);
$this->handle_as_video($doc, $entry, $source_stream, $poster_url, $debug); $this->handle_as_video($doc, $entry, $source_stream, $poster_url, $debug);
@ -259,7 +259,7 @@ class Af_RedditImgur extends Plugin {
$entry->parentNode->insertBefore($br, $entry); $entry->parentNode->insertBefore($br, $entry);
} else if ($aentry->tagName == "source") { } else if ($aentry->tagName == "source") {
if (strpos($url, "i.imgur.com") !== FALSE) if (strpos($url, "imgur.com") !== FALSE)
$poster_url = str_replace(".mp4", "h.jpg", $url); $poster_url = str_replace(".mp4", "h.jpg", $url);
else else
$poster_url = ""; $poster_url = "";

Loading…
Cancel
Save