mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 18:55:55 +00:00
af_redditimgur: use core youtube vid helper
This commit is contained in:
@@ -425,13 +425,7 @@ class Af_RedditImgur extends Plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$matches = array();
|
$matches = array();
|
||||||
if (!$found && (preg_match("/youtube\.com\/v\/([\w-]+)/", $entry_href, $matches) ||
|
if (!$found && $vid_id = UrlHelper::url_to_youtube_vid($entry_href)) {
|
||||||
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))) {
|
|
||||||
|
|
||||||
$vid_id = $matches[1];
|
|
||||||
|
|
||||||
Debug::log("Handling as youtube: $vid_id", Debug::LOG_VERBOSE);
|
Debug::log("Handling as youtube: $vid_id", Debug::LOG_VERBOSE);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user