Added soundtracks to dashboard

This commit is contained in:
2017-06-27 16:51:27 +02:00
parent 990a8032f3
commit 064a3e1fa5
3 changed files with 40 additions and 21 deletions

View File

@ -2,7 +2,6 @@ package music
import (
"net/http"
"sort"
"github.com/aerogo/aero"
"github.com/animenotifier/arn"
@ -19,10 +18,6 @@ func Get(ctx *aero.Context) string {
return ctx.Error(http.StatusInternalServerError, "Error fetching soundtracks", err)
}
sort.Slice(tracks, func(i, j int) bool {
return tracks[i].Created > tracks[j].Created
})
if len(tracks) > maxTracks {
tracks = tracks[:maxTracks]
}