From 15267bd102e3ba52876371a564c3cfc49582aad3 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Wed, 18 Oct 2017 22:28:47 +0200 Subject: [PATCH] Fixed soundtrack video OpenGraph --- pages/soundtrack/soundtrack.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pages/soundtrack/soundtrack.go b/pages/soundtrack/soundtrack.go index 416090b2..cba2f1d8 100644 --- a/pages/soundtrack/soundtrack.go +++ b/pages/soundtrack/soundtrack.go @@ -31,7 +31,8 @@ func Get(ctx *aero.Context) string { } // Set video so that it can be played - youtube := track.MediaByName("Youtube") + youtube := track.MediaByService("Youtube") + if len(youtube) > 0 { openGraph.Tags["og:video"] = "https://www.youtube.com/v/" + youtube[0].ServiceID }