Changed OG video player size

This commit is contained in:
Eduard Urbach 2018-04-16 16:21:18 +02:00
parent 50b800971e
commit c750a1b9aa

View File

@ -18,18 +18,20 @@ func getOpenGraph(ctx *aero.Context, amv *arn.AMV) *arn.OpenGraph {
Meta: map[string]string{},
}
if amv.MainAnime() != nil {
openGraph.Tags["og:image"] = amv.MainAnime().ImageLink("large")
openGraph.Tags["og:description"] = amv.MainAnime().Title.Canonical + " (" + strings.Join(amv.Tags, ", ") + ")"
} else {
// if amv.MainAnime() != nil {
// openGraph.Tags["og:image"] = amv.MainAnime().ImageLink("large")
// openGraph.Tags["og:description"] = amv.MainAnime().Title.Canonical + " (" + strings.Join(amv.Tags, ", ") + ")"
// } else {
// openGraph.Tags["og:description"] = strings.Join(amv.Tags, ", ")
// }
openGraph.Tags["og:description"] = strings.Join(amv.Tags, ", ")
}
if amv.File != "" {
openGraph.Tags["og:video"] = "https://" + ctx.App.Config.Domain + "/videos/amvs/" + amv.File
openGraph.Tags["og:video:type"] = "video/webm"
openGraph.Tags["og:video:width"] = "640"
openGraph.Tags["og:video:height"] = "360"
openGraph.Tags["og:video:width"] = "320"
openGraph.Tags["og:video:height"] = "180"
openGraph.Meta["twitter:player"] = openGraph.Tags["og:video"]
openGraph.Meta["twitter:player:width"] = openGraph.Tags["og:video:width"]