Added audio to assets

This commit is contained in:
Eduard Urbach 2018-03-11 02:20:30 +01:00
parent 2d88ffd0a8
commit 2f176ee602
2 changed files with 7 additions and 3 deletions

View File

@ -61,6 +61,12 @@ func configureAssets(app *aero.Application) {
return ctx.File("videos" + ctx.Get("file"))
})
// Audio
app.Get("/audio/*file", func(ctx *aero.Context) string {
ctx.Response().Header().Set("Access-Control-Allow-Origin", "*")
return ctx.File("audio" + ctx.Get("file"))
})
// Anime sitemap
app.Get("/sitemap/anime.txt", func(ctx *aero.Context) string {
sitemap := sitemap.New()

View File

@ -15,7 +15,7 @@ func main() {
defer arn.Node.Close()
for track := range arn.StreamSoundTracks() {
fmt.Println(track.ID, track.Title)
fmt.Println(track.Title)
err := track.Download()
@ -24,8 +24,6 @@ func main() {
continue
}
fmt.Println(track.File)
// Save the file information
track.Save()