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.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/server/lib/schedulers/videos-redundancy-scheduler.ts b/server/lib/schedulers/videos-redundancy-scheduler.ts
index 82005a2c8..93e76626c 100644
--- a/server/lib/schedulers/videos-redundancy-scheduler.ts
+++ b/server/lib/schedulers/videos-redundancy-scheduler.ts
@@ -301,7 +301,15 @@ export class VideosRedundancyScheduler extends AbstractScheduler {
301 const toDelete = await VideoRedundancyModel.loadOldestLocalExpired(redundancy.strategy, redundancy.minLifetime) 301 const toDelete = await VideoRedundancyModel.loadOldestLocalExpired(redundancy.strategy, redundancy.minLifetime)
302 if (!toDelete) return 302 if (!toDelete) return
303 303
304 await removeVideoRedundancy(toDelete) 304 const videoId = toDelete.VideoFile
305 ? toDelete.VideoFile.videoId
306 : toDelete.VideoStreamingPlaylist.videoId
307
308 const redundancies = await VideoRedundancyModel.listLocalByVideoId(videoId)
309
310 for (const redundancy of redundancies) {
311 await removeVideoRedundancy(redundancy)
312 }
305 } 313 }
306 } 314 }
307 315