Music play in Discord
This commit is contained in:
parent
a8081d9504
commit
7adbba2495
@ -35,7 +35,7 @@ func Get(ctx *aero.Context) string {
|
|||||||
"og:title": track.Title,
|
"og:title": track.Title,
|
||||||
"og:description": track.MainAnime().Title.Canonical + " (" + strings.Join(descriptionTags, ", ") + ")",
|
"og:description": track.MainAnime().Title.Canonical + " (" + strings.Join(descriptionTags, ", ") + ")",
|
||||||
"og:url": "https://" + ctx.App.Config.Domain + track.Link(),
|
"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",
|
"og:type": "music.song",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -44,6 +44,11 @@ func Get(ctx *aero.Context) string {
|
|||||||
openGraph.Tags["og:image"] = track.MainAnime().ImageLink("large")
|
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
|
// Set video so that it can be played
|
||||||
youtube := track.MediaByService("Youtube")
|
youtube := track.MediaByService("Youtube")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user