aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/api/videos/update.ts11
1 files changed, 10 insertions, 1 deletions
diff --git a/server/controllers/api/videos/update.ts b/server/controllers/api/videos/update.ts
index c0eb4ebee..e397127f3 100644
--- a/server/controllers/api/videos/update.ts
+++ b/server/controllers/api/videos/update.ts
@@ -202,9 +202,18 @@ function updateSchedule (videoInstance: MVideoFullLight, videoInfoToUpdate: Vide
202} 202}
203 203
204async function updateTorrentsMetadata (video: MVideoFullLight) { 204async function updateTorrentsMetadata (video: MVideoFullLight) {
205 for (const file of video.getAllFiles()) { 205 for (const file of (video.VideoFiles || [])) {
206 await updateTorrentMetadata(video, file) 206 await updateTorrentMetadata(video, file)
207 207
208 await file.save() 208 await file.save()
209 } 209 }
210
211 const hls = video.getHLSPlaylist()
212 if (!hls) return
213
214 for (const file of (hls.VideoFiles || [])) {
215 await updateTorrentMetadata(hls, file)
216
217 await file.save()
218 }
210} 219}