diff options
author | kdan <[email protected]> | 2021-05-11 11:05:20 +0300 |
---|---|---|
committer | kdan <[email protected]> | 2021-05-11 11:05:20 +0300 |
commit | 2ccf0e50a25086bb81155492ee9ebd1ac755c035 (patch) | |
tree | 7ad648695adb52632a08f9958176c339f5dbba5e /plugins/af_redditimgur | |
parent | acf0e0d266add0566e41b28946ee73fa01022255 (diff) | |
parent | b2f888e3868c3703819e8acc1519e44d57a53259 (diff) |
Merge branch 'master' into master
Diffstat (limited to 'plugins/af_redditimgur')
-rwxr-xr-x | plugins/af_redditimgur/init.php | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/plugins/af_redditimgur/init.php b/plugins/af_redditimgur/init.php index b16b679af..3b4094b1b 100755 --- a/plugins/af_redditimgur/init.php +++ b/plugins/af_redditimgur/init.php @@ -425,13 +425,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))) { - - $vid_id = $matches[1]; + if (!$found && $vid_id = UrlHelper::url_to_youtube_vid($entry_href)) { Debug::log("Handling as youtube: $vid_id", Debug::LOG_VERBOSE); |