Add a sortable Starred column and a Starred filter to Song List

This commit is contained in:
Deluan
2020-05-22 23:10:58 -04:00
parent 3632608de0
commit ec0002e77a
4 changed files with 19 additions and 5 deletions
+3 -2
View File
@@ -28,13 +28,14 @@ func NewMediaFileRepository(ctx context.Context, o orm.Ormer) *mediaFileReposito
"random": "RANDOM()",
}
r.filterMappings = map[string]filterFunc{
"title": fullTextFilter,
"title": fullTextFilter,
"starred": booleanFilter,
}
return r
}
func (r mediaFileRepository) CountAll(options ...model.QueryOptions) (int64, error) {
return r.count(Select(), options...)
return r.count(r.newSelectWithAnnotation("id", options...))
}
func (r mediaFileRepository) Exists(id string) (bool, error) {