]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Do not display wait transcoding checkbox
authorChocobozzz <me@florianbigard.com>
Thu, 26 Nov 2020 08:30:26 +0000 (09:30 +0100)
committerChocobozzz <me@florianbigard.com>
Thu, 26 Nov 2020 10:30:18 +0000 (11:30 +0100)
If this is a live and save replay is not enabled

client/src/app/+videos/+video-edit/shared/video-edit.component.html
client/src/app/+videos/+video-edit/shared/video-edit.component.ts

index 3a24c4136f32c440af35bafcc75668be127c6112..bf8b0b2673017d11f5bc0f07729cf04f14f689c6 100644 (file)
               </ng-template>
             </my-peertube-checkbox>
 
-            <my-peertube-checkbox *ngIf="waitTranscodingEnabled" inputName="waitTranscoding" formControlName="waitTranscoding" helpPlacement="bottom-right">
+            <my-peertube-checkbox *ngIf="isWaitTranscodingDisplayed()" inputName="waitTranscoding" formControlName="waitTranscoding" helpPlacement="bottom-right">
               <ng-template ptTemplate="label">
                 <ng-container i18n>Publish after transcoding</ng-container>
               </ng-template>
index 26d871e59307484b985916b4aac786bd703804c4..de78a18cc6ba1319fc4185e0a70f836431d4f09a 100644 (file)
@@ -102,6 +102,16 @@ export class VideoEditComponent implements OnInit, OnDestroy {
                .map(c => c.language.id)
   }
 
+  isWaitTranscodingDisplayed () {
+    if (!this.waitTranscodingEnabled) return false
+
+    if (this.liveVideo) {
+      return this.form.value['saveReplay'] === true
+    }
+
+    return true
+  }
+
   updateForm () {
     const defaultValues: any = {
       nsfw: 'false',