From a024069a16899b275e1e728d01ba6adace313d63 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Wed, 5 Feb 2020 20:59:23 +0100 Subject: [PATCH] Hide vimeo videos since they cause ssl errors --- bin/import-game-data.php | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/bin/import-game-data.php b/bin/import-game-data.php index 97486ff..422b802 100755 --- a/bin/import-game-data.php +++ b/bin/import-game-data.php @@ -419,10 +419,12 @@ function buildDetails($game) ], ]; } else { - $mediaTiles[] = [ - 'type' => 'video', - 'url' => $medium->url, - ]; + if (!isUnsupportedVideoUrl($medium->url)) { + $mediaTiles[] = [ + 'type' => 'video', + 'url' => $medium->url, + ]; + } } } @@ -852,6 +854,16 @@ function getPromotedProduct($game) return null; } +/** + * vimeo only work with HTTPS now, + * and the OUYA does not support SNI. + * We get SSL errors and no video for them :/ + */ +function isUnsupportedVideoUrl($url) +{ + return strpos($url, '://vimeo.com/') !== false; +} + function removeMakeGames(array $games) { return filterByGenre($games, 'Tutorials', true); -- 2.30.2