aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-main/video-caption
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-01-18 11:37:29 +0100
committerChocobozzz <me@florianbigard.com>2022-01-18 11:37:29 +0100
commite8bffe9690307f2686ed5573cae2b86ee5f57789 (patch)
treee6268124e5e9c22eb465d94ad638ed8443bc9743 /client/src/app/shared/shared-main/video-caption
parentc1f7a737cfe174ff1648f269a62540826d0e8089 (diff)
downloadPeerTube-e8bffe9690307f2686ed5573cae2b86ee5f57789.tar.gz
PeerTube-e8bffe9690307f2686ed5573cae2b86ee5f57789.tar.zst
PeerTube-e8bffe9690307f2686ed5573cae2b86ee5f57789.zip
Remove unnecessary function
Diffstat (limited to 'client/src/app/shared/shared-main/video-caption')
-rw-r--r--client/src/app/shared/shared-main/video-caption/video-caption.service.ts12
1 files changed, 3 insertions, 9 deletions
diff --git a/client/src/app/shared/shared-main/video-caption/video-caption.service.ts b/client/src/app/shared/shared-main/video-caption/video-caption.service.ts
index 29d6d0f4c..97b79d842 100644
--- a/client/src/app/shared/shared-main/video-caption/video-caption.service.ts
+++ b/client/src/app/shared/shared-main/video-caption/video-caption.service.ts
@@ -42,10 +42,7 @@ export class VideoCaptionService {
42 42
43 removeCaption (videoId: number | string, language: string) { 43 removeCaption (videoId: number | string, language: string) {
44 return this.authHttp.delete(`${VideoService.BASE_VIDEO_URL}/${videoId}/captions/${language}`) 44 return this.authHttp.delete(`${VideoService.BASE_VIDEO_URL}/${videoId}/captions/${language}`)
45 .pipe( 45 .pipe(catchError(res => this.restExtractor.handleError(res)))
46 map(this.restExtractor.extractDataBool),
47 catchError(res => this.restExtractor.handleError(res))
48 )
49 } 46 }
50 47
51 addCaption (videoId: number | string, language: string, captionfile: File) { 48 addCaption (videoId: number | string, language: string, captionfile: File) {
@@ -53,14 +50,11 @@ export class VideoCaptionService {
53 const data = objectToFormData(body) 50 const data = objectToFormData(body)
54 51
55 return this.authHttp.put(`${VideoService.BASE_VIDEO_URL}/${videoId}/captions/${language}`, data) 52 return this.authHttp.put(`${VideoService.BASE_VIDEO_URL}/${videoId}/captions/${language}`, data)
56 .pipe( 53 .pipe(catchError(res => this.restExtractor.handleError(res)))
57 map(this.restExtractor.extractDataBool),
58 catchError(res => this.restExtractor.handleError(res))
59 )
60 } 54 }
61 55
62 updateCaptions (videoId: number | string, videoCaptions: VideoCaptionEdit[]) { 56 updateCaptions (videoId: number | string, videoCaptions: VideoCaptionEdit[]) {
63 let obs = of(true) 57 let obs: Observable<any> = of(undefined)
64 58
65 for (const videoCaption of videoCaptions) { 59 for (const videoCaption of videoCaptions) {
66 if (videoCaption.action === 'CREATE') { 60 if (videoCaption.action === 'CREATE') {