Revert "Replace COUNT(DISTINCT primary_key) with COUNT(*)"
Genres are required as part of the count queries, so filter by genres work
This commit is contained in:
@@ -40,6 +40,7 @@ func NewMediaFileRepository(ctx context.Context, o orm.QueryExecutor) *mediaFile
|
||||
|
||||
func (r *mediaFileRepository) CountAll(options ...model.QueryOptions) (int64, error) {
|
||||
sql := r.newSelectWithAnnotation("media_file.id")
|
||||
sql = r.withGenres(sql) // Required for filtering by genre
|
||||
return r.count(sql, options...)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user