X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fcontrollers%2Fapi%2Fremote.js;h=be5e6dc98e99e16dd82459e7eddc5387bb42e57f;hb=8fd66b75bfbd8fd4945f1944411461b05eb74795;hp=254ae56d52b0fb63a075ba2b6276755c4bc78c89;hpb=3d118fb501f576a298f6bb059167e4c7f4dd8dcc;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/controllers/api/remote.js b/server/controllers/api/remote.js index 254ae56d5..be5e6dc98 100644 --- a/server/controllers/api/remote.js +++ b/server/controllers/api/remote.js @@ -1,6 +1,5 @@ 'use strict' -const each = require('async/each') const eachSeries = require('async/eachSeries') const express = require('express') const waterfall = require('async/waterfall') @@ -98,7 +97,8 @@ function addRemoteVideo (videoToCreateData, fromPod, finalCallback) { description: videoToCreateData.description, authorId: author.id, duration: videoToCreateData.duration, - createdAt: videoToCreateData.createdAt + createdAt: videoToCreateData.createdAt, + updatedAt: videoToCreateData.updatedAt } const video = db.Video.build(videoData) @@ -190,6 +190,7 @@ function updateRemoteVideo (videoAttributesToUpdate, fromPod, finalCallback) { videoInstance.set('infoHash', videoAttributesToUpdate.infoHash) videoInstance.set('duration', videoAttributesToUpdate.duration) videoInstance.set('createdAt', videoAttributesToUpdate.createdAt) + videoInstance.set('updatedAt', videoAttributesToUpdate.updatedAt) videoInstance.set('extname', videoAttributesToUpdate.extname) videoInstance.save(options).asCallback(function (err) {