Use the Piped proxy for thumbnails.
This commit is contained in:
parent
d5439a9ae8
commit
ca7e7affd6
@ -13,7 +13,7 @@ class Af_Youtube_Thumbnail extends Plugin {
|
|||||||
function hook_article_filter($article) {
|
function hook_article_filter($article) {
|
||||||
if(strpos($article["link"], "youtube.com") !== FALSE) {
|
if(strpos($article["link"], "youtube.com") !== FALSE) {
|
||||||
$video_id = str_replace('https://www.youtube.com/watch?v=', '', $article["link"]);
|
$video_id = str_replace('https://www.youtube.com/watch?v=', '', $article["link"]);
|
||||||
$article["content"] = '<img src="https://img.youtube.com/vi/'.$video_id.'/hqdefault.jpg" alt="'.$article["title"].'" />';
|
$article["content"] = '<img src="https://pipedproxy.yanknil.com/vi/'.$video_id.'/hqdefault.jpg?host=i.ytimg.com" alt="'.$article["title"].'" />';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $article;
|
return $article;
|
||||||
|
Loading…
Reference in New Issue
Block a user