diff options
Diffstat (limited to 'shared/extra-utils/videos/videos-command.ts')
-rw-r--r-- | shared/extra-utils/videos/videos-command.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/shared/extra-utils/videos/videos-command.ts b/shared/extra-utils/videos/videos-command.ts index 33725bfdc..d35339c8d 100644 --- a/shared/extra-utils/videos/videos-command.ts +++ b/shared/extra-utils/videos/videos-command.ts | |||
@@ -188,6 +188,17 @@ export class VideosCommand extends AbstractCommand { | |||
188 | return id | 188 | return id |
189 | } | 189 | } |
190 | 190 | ||
191 | async listFiles (options: OverrideCommandOptions & { | ||
192 | id: number | string | ||
193 | }) { | ||
194 | const video = await this.get(options) | ||
195 | |||
196 | const files = video.files || [] | ||
197 | const hlsFiles = video.streamingPlaylists[0]?.files || [] | ||
198 | |||
199 | return files.concat(hlsFiles) | ||
200 | } | ||
201 | |||
191 | // --------------------------------------------------------------------------- | 202 | // --------------------------------------------------------------------------- |
192 | 203 | ||
193 | listMyVideos (options: OverrideCommandOptions & { | 204 | listMyVideos (options: OverrideCommandOptions & { |