Music play in Discord

This commit is contained in:
Eduard Urbach 2018-04-06 08:09:17 +02:00
parent a8081d9504
commit 7adbba2495

View File

@ -35,7 +35,7 @@ func Get(ctx *aero.Context) string {
"og:title": track.Title,
"og:description": track.MainAnime().Title.Canonical + " (" + strings.Join(descriptionTags, ", ") + ")",
"og:url": "https://" + ctx.App.Config.Domain + track.Link(),
"og:site_name": "notify.moe",
"og:site_name": ctx.App.Config.Domain,
"og:type": "music.song",
},
}
@ -44,6 +44,11 @@ func Get(ctx *aero.Context) string {
openGraph.Tags["og:image"] = track.MainAnime().ImageLink("large")
}
if track.File != "" {
openGraph.Tags["og:audio"] = "https://" + ctx.App.Config.Domain + "/audio/" + track.File
openGraph.Tags["og:audio:type"] = "audio/vnd.facebook.bridge"
}
// Set video so that it can be played
youtube := track.MediaByService("Youtube")