]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+videos/+video-edit/video-update.component.ts
Merge branch 'release/3.1.0' into develop
[github/Chocobozzz/PeerTube.git] / client / src / app / +videos / +video-edit / video-update.component.ts
index f27ebd20e5da238941faf21a831ac098b9041abf..2973c6840619b6c0618b76ab710c3df9f25c627e 100644 (file)
@@ -1,9 +1,10 @@
 import { of } from 'rxjs'
 import { map, switchMap } from 'rxjs/operators'
+import { SelectChannelItem } from 'src/types/select-options-item.model'
 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 { FormReactive, FormValidatorService } from '@app/shared/shared-forms'
 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'
@@ -137,13 +138,10 @@ export class VideoUpdateComponent extends FormReactive implements OnInit {
             if (!this.liveVideo) return of(undefined)
 
             const liveVideoUpdate: LiveVideoUpdate = {
-              saveReplay: this.form.value.saveReplay,
-              permanentLive: this.form.value.permanentLive
+              saveReplay: !!this.form.value.saveReplay,
+              permanentLive: !!this.form.value.permanentLive
             }
 
-            console.log(liveVideoUpdate)
-            console.log(this.form.value)
-
             // Don't update live attributes if they did not change
             const liveChanged = Object.keys(liveVideoUpdate)
               .some(key => this.liveVideo[key] !== liveVideoUpdate[key])