aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+videos/+video-edit/video-add-components/video-send.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-08-06 16:14:58 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-08-07 08:28:14 +0200
commita02b93ce756d646a59cef57b5e4ff53c2bb30bec (patch)
tree02c70651eed0a4c414e04239aa853b2377228ce9 /client/src/app/+videos/+video-edit/video-add-components/video-send.ts
parentd88c9eb9db19965d0075d5835b8837649b2728fd (diff)
downloadPeerTube-a02b93ce756d646a59cef57b5e4ff53c2bb30bec.tar.gz
PeerTube-a02b93ce756d646a59cef57b5e4ff53c2bb30bec.tar.zst
PeerTube-a02b93ce756d646a59cef57b5e4ff53c2bb30bec.zip
Fix lint
Diffstat (limited to 'client/src/app/+videos/+video-edit/video-add-components/video-send.ts')
-rw-r--r--client/src/app/+videos/+video-edit/video-add-components/video-send.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/client/src/app/+videos/+video-edit/video-add-components/video-send.ts b/client/src/app/+videos/+video-edit/video-add-components/video-send.ts
index 5d11ba7ce..2e658dfae 100644
--- a/client/src/app/+videos/+video-edit/video-add-components/video-send.ts
+++ b/client/src/app/+videos/+video-edit/video-add-components/video-send.ts
@@ -1,5 +1,5 @@
1import { catchError, switchMap, tap } from 'rxjs/operators' 1import { catchError, switchMap, tap } from 'rxjs/operators'
2import { EventEmitter, OnInit, Directive } from '@angular/core' 2import { Directive, EventEmitter, OnInit } from '@angular/core'
3import { AuthService, CanComponentDeactivateResult, Notifier, ServerService } from '@app/core' 3import { AuthService, CanComponentDeactivateResult, Notifier, ServerService } from '@app/core'
4import { populateAsyncUserVideoChannels } from '@app/helpers' 4import { populateAsyncUserVideoChannels } from '@app/helpers'
5import { FormReactive } from '@app/shared/shared-forms' 5import { FormReactive } from '@app/shared/shared-forms'
@@ -8,6 +8,7 @@ import { LoadingBarService } from '@ngx-loading-bar/core'
8import { ServerConfig, VideoConstant, VideoPrivacy } from '@shared/models' 8import { ServerConfig, VideoConstant, VideoPrivacy } from '@shared/models'
9 9
10@Directive() 10@Directive()
11// tslint:disable-next-line: directive-class-suffix
11export abstract class VideoSend extends FormReactive implements OnInit { 12export abstract class VideoSend extends FormReactive implements OnInit {
12 userVideoChannels: { id: number, label: string, support: string }[] = [] 13 userVideoChannels: { id: number, label: string, support: string }[] = []
13 videoPrivacies: VideoConstant<VideoPrivacy>[] = [] 14 videoPrivacies: VideoConstant<VideoPrivacy>[] = []
@@ -56,15 +57,15 @@ export abstract class VideoSend extends FormReactive implements OnInit {
56 } 57 }
57 58
58 protected updateVideoAndCaptions (video: VideoEdit) { 59 protected updateVideoAndCaptions (video: VideoEdit) {
59 this.loadingBar.start() 60 this.loadingBar.useRef().start()
60 61
61 return this.videoService.updateVideo(video) 62 return this.videoService.updateVideo(video)
62 .pipe( 63 .pipe(
63 // Then update captions 64 // Then update captions
64 switchMap(() => this.videoCaptionService.updateCaptions(video.id, this.videoCaptions)), 65 switchMap(() => this.videoCaptionService.updateCaptions(video.id, this.videoCaptions)),
65 tap(() => this.loadingBar.complete()), 66 tap(() => this.loadingBar.useRef().complete()),
66 catchError(err => { 67 catchError(err => {
67 this.loadingBar.complete() 68 this.loadingBar.useRef().complete()
68 throw err 69 throw err
69 }) 70 })
70 ) 71 )