diff options
Diffstat (limited to 'shared/server-commands/videos')
-rw-r--r-- | shared/server-commands/videos/videos-command.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/shared/server-commands/videos/videos-command.ts b/shared/server-commands/videos/videos-command.ts index 1cceb58db..e952c9777 100644 --- a/shared/server-commands/videos/videos-command.ts +++ b/shared/server-commands/videos/videos-command.ts | |||
@@ -23,6 +23,7 @@ import { | |||
23 | import { unwrapBody } from '../requests' | 23 | import { unwrapBody } from '../requests' |
24 | import { waitJobs } from '../server' | 24 | import { waitJobs } from '../server' |
25 | import { AbstractCommand, OverrideCommandOptions } from '../shared' | 25 | import { AbstractCommand, OverrideCommandOptions } from '../shared' |
26 | import { VideoSource } from '@shared/models/videos/video-source' | ||
26 | 27 | ||
27 | export type VideoEdit = Partial<Omit<VideoCreate, 'thumbnailfile' | 'previewfile'>> & { | 28 | export type VideoEdit = Partial<Omit<VideoCreate, 'thumbnailfile' | 'previewfile'>> & { |
28 | fixture?: string | 29 | fixture?: string |
@@ -150,6 +151,20 @@ export class VideosCommand extends AbstractCommand { | |||
150 | }) | 151 | }) |
151 | } | 152 | } |
152 | 153 | ||
154 | getSource (options: OverrideCommandOptions & { | ||
155 | id: number | string | ||
156 | }) { | ||
157 | const path = '/api/v1/videos/' + options.id + '/source' | ||
158 | |||
159 | return this.getRequestBody<VideoSource>({ | ||
160 | ...options, | ||
161 | |||
162 | path, | ||
163 | implicitToken: true, | ||
164 | defaultExpectedStatus: HttpStatusCode.OK_200 | ||
165 | }) | ||
166 | } | ||
167 | |||
153 | async getId (options: OverrideCommandOptions & { | 168 | async getId (options: OverrideCommandOptions & { |
154 | uuid: number | string | 169 | uuid: number | string |
155 | }) { | 170 | }) { |