aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/controllers/api/videos/upload.ts6
-rw-r--r--server/models/video/video-channel.ts2
2 files changed, 4 insertions, 4 deletions
diff --git a/server/controllers/api/videos/upload.ts b/server/controllers/api/videos/upload.ts
index 7ffda749d..7e87df8b1 100644
--- a/server/controllers/api/videos/upload.ts
+++ b/server/controllers/api/videos/upload.ts
@@ -197,9 +197,6 @@ async function addVideo (options: {
197 }, sequelizeOptions) 197 }, sequelizeOptions)
198 } 198 }
199 199
200 // Channel has a new content, set as updated
201 await videoCreated.VideoChannel.setAsUpdated(t)
202
203 await autoBlacklistVideoIfNeeded({ 200 await autoBlacklistVideoIfNeeded({
204 video, 201 video,
205 user, 202 user,
@@ -214,6 +211,9 @@ async function addVideo (options: {
214 return { videoCreated } 211 return { videoCreated }
215 }) 212 })
216 213
214 // Channel has a new content, set as updated
215 await videoCreated.VideoChannel.setAsUpdated()
216
217 createTorrentFederate(video, videoFile) 217 createTorrentFederate(video, videoFile)
218 .then(() => { 218 .then(() => {
219 if (video.state === VideoState.TO_MOVE_TO_EXTERNAL_STORAGE) { 219 if (video.state === VideoState.TO_MOVE_TO_EXTERNAL_STORAGE) {
diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts
index 278149d60..c04bd4355 100644
--- a/server/models/video/video-channel.ts
+++ b/server/models/video/video-channel.ts
@@ -753,7 +753,7 @@ ON "Account->Actor"."serverId" = "Account->Actor->Server"."id"`
753 return this.Actor.isOutdated() 753 return this.Actor.isOutdated()
754 } 754 }
755 755
756 setAsUpdated (transaction: Transaction) { 756 setAsUpdated (transaction?: Transaction) {
757 return setAsUpdated('videoChannel', this.id, transaction) 757 return setAsUpdated('videoChannel', this.id, transaction)
758 } 758 }
759} 759}