19 lines
345 B
Go
Raw Normal View History

2017-10-02 04:29:58 +00:00
package soundtracks
2017-06-27 10:39:41 +00:00
2017-06-27 12:01:32 +00:00
import (
"github.com/aerogo/aero"
2019-06-03 09:32:43 +00:00
"github.com/animenotifier/notify.moe/arn"
2017-06-27 12:01:32 +00:00
)
2017-06-27 10:39:41 +00:00
2018-03-13 21:38:26 +00:00
// Latest renders the latest soundtracks.
2019-06-01 04:55:49 +00:00
func Latest(ctx aero.Context) error {
2018-03-13 21:38:26 +00:00
// Fetch all eligible tracks
tracks := fetchAll()
2017-10-16 09:53:47 +00:00
2018-03-13 21:38:26 +00:00
// Sort the tracks by date
arn.SortSoundTracksLatestFirst(tracks)
2017-10-16 10:56:46 +00:00
// Render
return render(ctx, tracks)
2017-10-16 09:53:47 +00:00
}