Added tag filter for soundtracks

This commit is contained in:
2018-03-13 01:49:54 +01:00
parent e67a2023c7
commit 634bbb151e
10 changed files with 114 additions and 25 deletions

View File

@ -20,11 +20,15 @@ func Best(ctx *aero.Context) string {
arn.SortSoundTracksPopularFirst(tracks)
// Limit the number of displayed tracks
loadMoreIndex := 0
if len(tracks) > maxTracks {
tracks = tracks[:maxTracks]
loadMoreIndex = maxTracks
}
return ctx.HTML(components.SoundTracks(tracks, maxTracks, user))
return ctx.HTML(components.SoundTracks(tracks, loadMoreIndex, "", user))
}
// BestFrom renders the soundtracks from the given index.