Implemented more getAlbumList.view types

This commit is contained in:
Deluan
2016-03-04 17:01:14 -05:00
parent 766fdbc60c
commit 1c9d7721ad
4 changed files with 21 additions and 5 deletions
+4 -2
View File
@@ -18,9 +18,11 @@ type GetAlbumListController struct {
func (c *GetAlbumListController) Prepare() {
inject.ExtractAssignable(utils.Graph, &c.albumRepo)
// TODO To implement other types, we need to fix album data at import time
c.types = map[string]domain.QueryOptions{
"newest": domain.QueryOptions{SortBy: "CreatedAt", Desc: true, Alpha: true},
"newest": domain.QueryOptions{SortBy: "CreatedAt", Desc: true, Alpha: true},
"recent": domain.QueryOptions{SortBy: "PlayDate", Desc: true, Alpha: true},
"frequent": domain.QueryOptions{SortBy: "PlayCount", Desc: true},
"highest": domain.QueryOptions{SortBy: "Rating", Desc: true},
}
}