]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
Use -1 for max live duration unlimited
[github/Chocobozzz/PeerTube.git] / client / src / app / +admin / config / edit-custom-config / edit-custom-config.component.ts
index 7920600fc1b4e70119e9d2dcbaae204fad9faa69..c3a833843b83933d45dea101161e84673379d27f 100644 (file)
@@ -98,7 +98,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit, A
     ]
 
     this.liveMaxDurationOptions = [
-      { value: null, label: $localize`No limit` },
+      { value: -1, label: $localize`No limit` },
       { value: 1000 * 3600, label: $localize`1 hour` },
       { value: 1000 * 3600 * 3, label: $localize`3 hours` },
       { value: 1000 * 3600 * 5, label: $localize`5 hours` },
@@ -359,10 +359,6 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit, A
   async formValidated () {
     const value: CustomConfig = this.form.getRawValue()
 
-    // Transform "null" to null
-    const maxDuration = value.live.maxDuration as any
-    if (maxDuration === 'null') value.live.maxDuration = null
-
     this.configService.updateCustomConfig(value)
       .subscribe(
         res => {