aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video.js')
-rw-r--r--server/models/video.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/server/models/video.js b/server/models/video.js
index 0023a24e1..af05a861f 100644
--- a/server/models/video.js
+++ b/server/models/video.js
@@ -16,7 +16,7 @@ const modelUtils = require('./utils')
16// --------------------------------------------------------------------------- 16// ---------------------------------------------------------------------------
17 17
18module.exports = function (sequelize, DataTypes) { 18module.exports = function (sequelize, DataTypes) {
19// TODO: add indexes on searchable columns 19 // TODO: add indexes on searchable columns
20 const Video = sequelize.define('Video', 20 const Video = sequelize.define('Video',
21 { 21 {
22 id: { 22 id: {
@@ -50,6 +50,7 @@ module.exports = function (sequelize, DataTypes) {
50 50
51 generateThumbnailFromBase64, 51 generateThumbnailFromBase64,
52 getDurationFromFile, 52 getDurationFromFile,
53 list,
53 listForApi, 54 listForApi,
54 listByHostAndRemoteId, 55 listByHostAndRemoteId,
55 listOwnedAndPopulateAuthorAndTags, 56 listOwnedAndPopulateAuthorAndTags,
@@ -310,6 +311,10 @@ function getDurationFromFile (videoPath, callback) {
310 }) 311 })
311} 312}
312 313
314function list (callback) {
315 return this.find().asCallback()
316}
317
313function listForApi (start, count, sort, callback) { 318function listForApi (start, count, sort, callback) {
314 const query = { 319 const query = {
315 offset: start, 320 offset: start,