]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/utils.ts
Try to fix bad timestamps in .srt
[github/Chocobozzz/PeerTube.git] / server / models / utils.ts
index 5337ae75dc38f924b3a89974e9b28c930a735eb4..ec51c66bfb81b9080f42963308c165af44c4a5fd 100644 (file)
@@ -54,6 +54,14 @@ function getVideoSort (value: string, lastSort: OrderItem = [ 'id', 'ASC' ]): Or
 
       [ Sequelize.col('VideoModel.views'), direction ],
 
+      lastSort
+    ]
+  } else if (field === 'publishedAt') {
+    return [
+      [ 'ScheduleVideoUpdate', 'updateAt', direction + ' NULLS LAST' ],
+
+      [ Sequelize.col('VideoModel.publishedAt'), direction ],
+
       lastSort
     ]
   }