aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/schedulers/videos-redundancy-scheduler.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/schedulers/videos-redundancy-scheduler.ts')
-rw-r--r--server/lib/schedulers/videos-redundancy-scheduler.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/server/lib/schedulers/videos-redundancy-scheduler.ts b/server/lib/schedulers/videos-redundancy-scheduler.ts
index 1a48f2bd0..4a8a1d413 100644
--- a/server/lib/schedulers/videos-redundancy-scheduler.ts
+++ b/server/lib/schedulers/videos-redundancy-scheduler.ts
@@ -1,5 +1,5 @@
1import { AbstractScheduler } from './abstract-scheduler' 1import { AbstractScheduler } from './abstract-scheduler'
2import { CONFIG, HLS_REDUNDANCY_DIRECTORY, REDUNDANCY, VIDEO_IMPORT_TIMEOUT } from '../../initializers' 2import { HLS_REDUNDANCY_DIRECTORY, REDUNDANCY, VIDEO_IMPORT_TIMEOUT, WEBSERVER } from '../../initializers'
3import { logger } from '../../helpers/logger' 3import { logger } from '../../helpers/logger'
4import { VideosRedundancy } from '../../../shared/models/redundancy' 4import { VideosRedundancy } from '../../../shared/models/redundancy'
5import { VideoRedundancyModel } from '../../models/redundancy/video-redundancy' 5import { VideoRedundancyModel } from '../../models/redundancy/video-redundancy'
@@ -15,6 +15,7 @@ import { getOrCreateVideoAndAccountAndChannel } from '../activitypub'
15import { VideoStreamingPlaylistModel } from '../../models/video/video-streaming-playlist' 15import { VideoStreamingPlaylistModel } from '../../models/video/video-streaming-playlist'
16import { VideoModel } from '../../models/video/video' 16import { VideoModel } from '../../models/video/video'
17import { downloadPlaylistSegments } from '../hls' 17import { downloadPlaylistSegments } from '../hls'
18import { CONFIG } from '../../initializers/config'
18 19
19type CandidateToDuplicate = { 20type CandidateToDuplicate = {
20 redundancy: VideosRedundancy, 21 redundancy: VideosRedundancy,
@@ -186,7 +187,7 @@ export class VideosRedundancyScheduler extends AbstractScheduler {
186 const createdModel = await VideoRedundancyModel.create({ 187 const createdModel = await VideoRedundancyModel.create({
187 expiresOn: this.buildNewExpiration(redundancy.minLifetime), 188 expiresOn: this.buildNewExpiration(redundancy.minLifetime),
188 url: getVideoCacheFileActivityPubUrl(file), 189 url: getVideoCacheFileActivityPubUrl(file),
189 fileUrl: video.getVideoRedundancyUrl(file, CONFIG.WEBSERVER.URL), 190 fileUrl: video.getVideoRedundancyUrl(file, WEBSERVER.URL),
190 strategy: redundancy.strategy, 191 strategy: redundancy.strategy,
191 videoFileId: file.id, 192 videoFileId: file.id,
192 actorId: serverActor.id 193 actorId: serverActor.id
@@ -212,7 +213,7 @@ export class VideosRedundancyScheduler extends AbstractScheduler {
212 const createdModel = await VideoRedundancyModel.create({ 213 const createdModel = await VideoRedundancyModel.create({
213 expiresOn: this.buildNewExpiration(redundancy.minLifetime), 214 expiresOn: this.buildNewExpiration(redundancy.minLifetime),
214 url: getVideoCacheStreamingPlaylistActivityPubUrl(video, playlist), 215 url: getVideoCacheStreamingPlaylistActivityPubUrl(video, playlist),
215 fileUrl: playlist.getVideoRedundancyUrl(CONFIG.WEBSERVER.URL), 216 fileUrl: playlist.getVideoRedundancyUrl(WEBSERVER.URL),
216 strategy: redundancy.strategy, 217 strategy: redundancy.strategy,
217 videoStreamingPlaylistId: playlist.id, 218 videoStreamingPlaylistId: playlist.id,
218 actorId: serverActor.id 219 actorId: serverActor.id