diff options
author | Chocobozzz <me@florianbigard.com> | 2023-07-28 11:07:03 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-07-28 11:09:03 +0200 |
commit | 89aa3331106874266f6feeee7bff852da2c1727e (patch) | |
tree | 6b03c6c4e4019b3d71da80f88a0775c2b5cbdd65 /shared/server-commands/videos | |
parent | ac8f81e3732548a28e0df03d588bf6777fad55cb (diff) | |
download | PeerTube-89aa3331106874266f6feeee7bff852da2c1727e.tar.gz PeerTube-89aa3331106874266f6feeee7bff852da2c1727e.tar.zst PeerTube-89aa3331106874266f6feeee7bff852da2c1727e.zip |
Add ability to force transcoding
Diffstat (limited to 'shared/server-commands/videos')
-rw-r--r-- | shared/server-commands/videos/videos-command.ts | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/shared/server-commands/videos/videos-command.ts b/shared/server-commands/videos/videos-command.ts index a58f1c545..4c3513ed4 100644 --- a/shared/server-commands/videos/videos-command.ts +++ b/shared/server-commands/videos/videos-command.ts | |||
@@ -775,19 +775,16 @@ export class VideosCommand extends AbstractCommand { | |||
775 | }) | 775 | }) |
776 | } | 776 | } |
777 | 777 | ||
778 | runTranscoding (options: OverrideCommandOptions & { | 778 | runTranscoding (options: OverrideCommandOptions & VideoTranscodingCreate & { |
779 | videoId: number | string | 779 | videoId: number | string |
780 | transcodingType: 'hls' | 'webtorrent' | 'web-video' | ||
781 | }) { | 780 | }) { |
782 | const path = '/api/v1/videos/' + options.videoId + '/transcoding' | 781 | const path = '/api/v1/videos/' + options.videoId + '/transcoding' |
783 | 782 | ||
784 | const fields: VideoTranscodingCreate = pick(options, [ 'transcodingType' ]) | ||
785 | |||
786 | return this.postBodyRequest({ | 783 | return this.postBodyRequest({ |
787 | ...options, | 784 | ...options, |
788 | 785 | ||
789 | path, | 786 | path, |
790 | fields, | 787 | fields: pick(options, [ 'transcodingType', 'forceTranscoding' ]), |
791 | implicitToken: true, | 788 | implicitToken: true, |
792 | defaultExpectedStatus: HttpStatusCode.NO_CONTENT_204 | 789 | defaultExpectedStatus: HttpStatusCode.NO_CONTENT_204 |
793 | }) | 790 | }) |