diff options
author | Chocobozzz <me@florianbigard.com> | 2018-07-16 15:24:50 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-07-16 15:24:50 +0200 |
commit | 329d9086601b7ae2127be12166ee8c892c289c6e (patch) | |
tree | 36bafacfcf438a14517a91f6614be64cedbe0854 /client/src/app/shared/video-caption | |
parent | 025c9794674b49ed3600a65d4608dd5677f0bcf4 (diff) | |
download | PeerTube-329d9086601b7ae2127be12166ee8c892c289c6e.tar.gz PeerTube-329d9086601b7ae2127be12166ee8c892c289c6e.tar.zst PeerTube-329d9086601b7ae2127be12166ee8c892c289c6e.zip |
Do not display private privacy if the video is not private
Diffstat (limited to 'client/src/app/shared/video-caption')
-rw-r--r-- | client/src/app/shared/video-caption/video-caption.service.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/client/src/app/shared/video-caption/video-caption.service.ts b/client/src/app/shared/video-caption/video-caption.service.ts index 4ae8ebd0a..d1444902d 100644 --- a/client/src/app/shared/video-caption/video-caption.service.ts +++ b/client/src/app/shared/video-caption/video-caption.service.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { catchError, map } from 'rxjs/operators' | 1 | import { catchError, map } from 'rxjs/operators' |
2 | import { HttpClient } from '@angular/common/http' | 2 | import { HttpClient } from '@angular/common/http' |
3 | import { Injectable } from '@angular/core' | 3 | import { Injectable } from '@angular/core' |
4 | import { forkJoin, Observable } from 'rxjs' | 4 | import { forkJoin, Observable, of } from 'rxjs' |
5 | import { ResultList } from '../../../../../shared' | 5 | import { ResultList } from '../../../../../shared' |
6 | import { RestExtractor, RestService } from '../rest' | 6 | import { RestExtractor, RestService } from '../rest' |
7 | import { VideoCaption } from '../../../../../shared/models/videos/video-caption.model' | 7 | import { VideoCaption } from '../../../../../shared/models/videos/video-caption.model' |
@@ -42,6 +42,8 @@ export class VideoCaptionService { | |||
42 | } | 42 | } |
43 | 43 | ||
44 | updateCaptions (videoId: number | string, videoCaptions: VideoCaptionEdit[]) { | 44 | updateCaptions (videoId: number | string, videoCaptions: VideoCaptionEdit[]) { |
45 | if (videoCaptions.length === 0) return of(true) | ||
46 | |||
45 | const observables: Observable<any>[] = [] | 47 | const observables: Observable<any>[] = [] |
46 | 48 | ||
47 | for (const videoCaption of videoCaptions) { | 49 | for (const videoCaption of videoCaptions) { |