Added audio to assets
This commit is contained in:
parent
2d88ffd0a8
commit
2f176ee602
@ -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()
|
||||
|
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user