19 lines
351 B
Go
Raw Normal View History

2017-11-19 17:02:20 +01:00
package soundtracks
import (
"github.com/aerogo/aero"
2019-06-03 18:32:43 +09:00
"github.com/animenotifier/notify.moe/arn"
2017-11-19 17:02:20 +01:00
)
2018-03-13 22:38:26 +01:00
// Best renders the best soundtracks.
2019-06-01 13:55:49 +09:00
func Best(ctx aero.Context) error {
2018-03-13 22:38:26 +01:00
// Fetch all eligible tracks
tracks := fetchAll()
2017-11-19 17:02:20 +01:00
2018-03-13 23:06:16 +01:00
// Sort the tracks by number of likes
arn.SortSoundTracksPopularFirst(tracks)
2017-11-19 17:02:20 +01:00
// Render
return render(ctx, tracks)
2017-11-19 17:02:20 +01:00
}