aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/videos.js
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-05-03 22:41:46 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-05-03 22:41:46 +0200
commit3a8a8b51228070d8e6a01ea6e460534aa0a20efc (patch)
tree00dadc882a50079ea29b28078ed45a8efc4fec3d /server/models/videos.js
parent6d8ada5f24b245d3c84d29d65013f5315cbeff27 (diff)
downloadPeerTube-3a8a8b51228070d8e6a01ea6e460534aa0a20efc.tar.gz
PeerTube-3a8a8b51228070d8e6a01ea6e460534aa0a20efc.tar.zst
PeerTube-3a8a8b51228070d8e6a01ea6e460534aa0a20efc.zip
Video duration support (server)
Diffstat (limited to 'server/models/videos.js')
-rw-r--r--server/models/videos.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/models/videos.js b/server/models/videos.js
index 13ef2295a..e02158be7 100644
--- a/server/models/videos.js
+++ b/server/models/videos.js
@@ -22,7 +22,8 @@ const videosSchema = mongoose.Schema({
22 description: String, 22 description: String,
23 magnetUri: String, 23 magnetUri: String,
24 podUrl: String, 24 podUrl: String,
25 author: String 25 author: String,
26 duration: Number
26}) 27})
27const VideosDB = mongoose.model('videos', videosSchema) 28const VideosDB = mongoose.model('videos', videosSchema)
28 29
@@ -72,7 +73,8 @@ function addRemotes (videos, callback) {
72 namePath: null, 73 namePath: null,
73 description: video.description, 74 description: video.description,
74 magnetUri: video.magnetUri, 75 magnetUri: video.magnetUri,
75 podUrl: video.podUrl 76 podUrl: video.podUrl,
77 duration: video.duration
76 } 78 }
77 79
78 to_add.push(params) 80 to_add.push(params)