aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/models/video.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/models/video.js b/server/models/video.js
index af05a861f..04478c8d7 100644
--- a/server/models/video.js
+++ b/server/models/video.js
@@ -320,7 +320,7 @@ function listForApi (start, count, sort, callback) {
320 offset: start, 320 offset: start,
321 limit: count, 321 limit: count,
322 distinct: true, // For the count, a video can have many tags 322 distinct: true, // For the count, a video can have many tags
323 order: [ modelUtils.getSort(sort) ], 323 order: [ modelUtils.getSort(sort), [ this.sequelize.models.Tag, 'name', 'ASC' ] ],
324 include: [ 324 include: [
325 { 325 {
326 model: this.sequelize.models.Author, 326 model: this.sequelize.models.Author,
@@ -440,7 +440,7 @@ function searchAndPopulateAuthorAndPodAndTags (value, field, start, count, sort,
440 offset: start, 440 offset: start,
441 limit: count, 441 limit: count,
442 distinct: true, // For the count, a video can have many tags 442 distinct: true, // For the count, a video can have many tags
443 order: [ modelUtils.getSort(sort) ] 443 order: [ modelUtils.getSort(sort), [ this.sequelize.models.Tag, 'name', 'ASC' ] ]
444 } 444 }
445 445
446 // Make an exact search with the magnet 446 // Make an exact search with the magnet