]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/api/videos/update.ts
No notification on moderator abuse
[github/Chocobozzz/PeerTube.git] / server / controllers / api / videos / update.ts
index c0eb4ebee2f2c99020a97ccb6b43439f986b367c..e397127f31a819bd4e896f2d4cb3e8a871406360 100644 (file)
@@ -202,9 +202,18 @@ function updateSchedule (videoInstance: MVideoFullLight, videoInfoToUpdate: Vide
 }
 
 async function updateTorrentsMetadata (video: MVideoFullLight) {
-  for (const file of video.getAllFiles()) {
+  for (const file of (video.VideoFiles || [])) {
     await updateTorrentMetadata(video, file)
 
     await file.save()
   }
+
+  const hls = video.getHLSPlaylist()
+  if (!hls) return
+
+  for (const file of (hls.VideoFiles || [])) {
+    await updateTorrentMetadata(hls, file)
+
+    await file.save()
+  }
 }