]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+videos/+video-edit/video-update.component.ts
emit more specific status codes on video upload (#3423)
[github/Chocobozzz/PeerTube.git] / client / src / app / +videos / +video-edit / video-update.component.ts
index 7126ad05be5007fe85f040acd4af3aca9155ecd9..30c82343bc4d1285ad931d4346a8711fa5f743f7 100644 (file)
@@ -1,13 +1,14 @@
+import { of } from 'rxjs'
 import { map, switchMap } from 'rxjs/operators'
 import { Component, HostListener, OnInit } from '@angular/core'
 import { ActivatedRoute, Router } from '@angular/router'
 import { Notifier } from '@app/core'
 import { FormReactive, FormValidatorService, SelectChannelItem } from '@app/shared/shared-forms'
-import { LiveVideoService, VideoCaptionEdit, VideoCaptionService, VideoDetails, VideoEdit, VideoService } from '@app/shared/shared-main'
+import { VideoCaptionEdit, VideoCaptionService, VideoDetails, VideoEdit, VideoService } from '@app/shared/shared-main'
+import { LiveVideoService } from '@app/shared/shared-video-live'
 import { LoadingBarService } from '@ngx-loading-bar/core'
 import { LiveVideo, LiveVideoUpdate, VideoPrivacy } from '@shared/models'
 import { hydrateFormFromVideo } from './shared/video-edit-utils'
-import { of } from 'rxjs'
 
 @Component({
   selector: 'my-videos-update',
@@ -63,7 +64,8 @@ export class VideoUpdateComponent extends FormReactive implements OnInit {
 
             if (this.liveVideo) {
               this.form.patchValue({
-                saveReplay: this.liveVideo.saveReplay
+                saveReplay: this.liveVideo.saveReplay,
+                permanentLive: this.liveVideo.permanentLive
               })
             }
           })
@@ -113,7 +115,8 @@ export class VideoUpdateComponent extends FormReactive implements OnInit {
     this.video.patch(this.form.value)
 
     const liveVideoUpdate: LiveVideoUpdate = {
-      saveReplay: this.form.value.saveReplay
+      saveReplay: this.form.value.saveReplay,
+      permanentLive: this.form.value.permanentLive
     }
 
     this.loadingBar.useRef().start()