Added Open Graph to soundtracks
This commit is contained in:
parent
1cf023e476
commit
e9e0aa89eb
@ -17,5 +17,15 @@ func Get(ctx *aero.Context) string {
|
|||||||
return ctx.Error(http.StatusNotFound, "Track not found", err)
|
return ctx.Error(http.StatusNotFound, "Track not found", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ctx.Data = &arn.OpenGraph{
|
||||||
|
Tags: map[string]string{
|
||||||
|
"og:title": track.Media[0].Title,
|
||||||
|
"og:image": track.Anime()[0].Image.Large,
|
||||||
|
"og:url": "https://" + ctx.App.Config.Domain + track.Link(),
|
||||||
|
"og:site_name": "notify.moe",
|
||||||
|
"og:type": "music.song",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
return ctx.HTML(components.Track(track))
|
return ctx.HTML(components.Track(track))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user