Skip to content

Commit

Permalink
fix(engines/invidious/video.php): broken thumbnails for youtube video…
Browse files Browse the repository at this point in the history
…s (merge pull request #169 from codedipper/yt-search)

fix(engines/invidious/video.php): thumbnails broken with Invidious frontend replacement
  • Loading branch information
Ahwxorg authored Jul 4, 2024
2 parents 533e316 + 8d8ef87 commit 1772481
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engines/invidious/video.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static function print_results($results, $opts) {
$uploader = $result["uploader"] ?? '';
$views = $result["views"] ?? '';
$date = $result["date"] ?? '';
$thumbnail = preg_replace('/(?:https?:\/\/)?(?:www\.)?youtube\.com\/watch\?v=([^\s]+)/', 'https://i.ytimg.com/vi/$1/maxresdefault.jpg', $url) ?? '';
$thumbnail = "https://i.ytimg.com/vi/" . htmlspecialchars(explode("=", $url)[1]) . "/maxresdefault.jpg" ?? '';

echo "<div class=\"text-result-wrapper\">";
echo "<a rel=\"noreferer noopener\" href=\"$url\">";
Expand Down

0 comments on commit 1772481

Please sign in to comment.