]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/extra-utils/videos/videos-command.ts
Optimize torrent URL update
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / videos / videos-command.ts
index 33725bfdcce58a41ded0ce6c277c7bef85243af8..d35339c8d4770b3e57b3041da73967df3420b7c6 100644 (file)
@@ -188,6 +188,17 @@ export class VideosCommand extends AbstractCommand {
     return id
   }
 
+  async listFiles (options: OverrideCommandOptions & {
+    id: number | string
+  }) {
+    const video = await this.get(options)
+
+    const files = video.files || []
+    const hlsFiles = video.streamingPlaylists[0]?.files || []
+
+    return files.concat(hlsFiles)
+  }
+
   // ---------------------------------------------------------------------------
 
   listMyVideos (options: OverrideCommandOptions & {