aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/schedulers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-12-04 17:08:55 +0100
committerChocobozzz <me@florianbigard.com>2018-12-04 17:08:55 +0100
commitb9fffa297f49a84df8ffd0d7b842599bc88a8e3e (patch)
tree49a12ebebf4d533e8b273abbb9492350a233101d /server/lib/schedulers
parent6040f87d143a5fa01db79867ece8197c3ce7be47 (diff)
downloadPeerTube-b9fffa297f49a84df8ffd0d7b842599bc88a8e3e.tar.gz
PeerTube-b9fffa297f49a84df8ffd0d7b842599bc88a8e3e.tar.zst
PeerTube-b9fffa297f49a84df8ffd0d7b842599bc88a8e3e.zip
Create redundancy endpoint
Diffstat (limited to 'server/lib/schedulers')
-rw-r--r--server/lib/schedulers/videos-redundancy-scheduler.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/schedulers/videos-redundancy-scheduler.ts b/server/lib/schedulers/videos-redundancy-scheduler.ts
index 8b7f33539..2a99a665d 100644
--- a/server/lib/schedulers/videos-redundancy-scheduler.ts
+++ b/server/lib/schedulers/videos-redundancy-scheduler.ts
@@ -145,13 +145,13 @@ export class VideosRedundancyScheduler extends AbstractScheduler {
145 145
146 const tmpPath = await downloadWebTorrentVideo({ magnetUri }, VIDEO_IMPORT_TIMEOUT) 146 const tmpPath = await downloadWebTorrentVideo({ magnetUri }, VIDEO_IMPORT_TIMEOUT)
147 147
148 const destPath = join(CONFIG.STORAGE.VIDEOS_DIR, video.getVideoFilename(file)) 148 const destPath = join(CONFIG.STORAGE.REDUNDANCY_DIR, video.getVideoFilename(file))
149 await rename(tmpPath, destPath) 149 await rename(tmpPath, destPath)
150 150
151 const createdModel = await VideoRedundancyModel.create({ 151 const createdModel = await VideoRedundancyModel.create({
152 expiresOn: this.buildNewExpiration(redundancy.minLifetime), 152 expiresOn: this.buildNewExpiration(redundancy.minLifetime),
153 url: getVideoCacheFileActivityPubUrl(file), 153 url: getVideoCacheFileActivityPubUrl(file),
154 fileUrl: video.getVideoFileUrl(file, CONFIG.WEBSERVER.URL), 154 fileUrl: video.getVideoRedundancyUrl(file, CONFIG.WEBSERVER.URL),
155 strategy: redundancy.strategy, 155 strategy: redundancy.strategy,
156 videoFileId: file.id, 156 videoFileId: file.id,
157 actorId: serverActor.id 157 actorId: serverActor.id