diff --git a/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.html b/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.html
index 7dfe5f5f9..929ea3a90 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.html
+++ b/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.html
@@ -267,10 +267,10 @@
inputName="importVideosHttpEnabled" formControlName="enabled"
i18n-labelText labelText="Allow import with HTTP URL (e.g. YouTube)"
>
-
- ⚠️ If enabled, we recommend to use a HTTP proxy to prevent private URL access from your PeerTube server
-
-
+
+ ⚠️ If enabled, we recommend to use a HTTP proxy to prevent private URL access from your PeerTube server
+
+
@@ -285,6 +285,22 @@
+
+
+
+
+
+
+ ⛔ You need to allow import with HTTP URL to be able to activate this feature.
+
+
+
+
+
+
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts
index 29910369a..90ed58c99 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts
+++ b/client/src/app/+admin/config/edit-custom-config/edit-basic-configuration.component.ts
@@ -25,11 +25,12 @@ export class EditBasicConfigurationComponent implements OnInit, OnChanges {
private configService: ConfigService,
private menuService: MenuService,
private themeService: ThemeService
- ) { }
+ ) {}
ngOnInit () {
this.buildLandingPageOptions()
this.checkSignupField()
+ this.checkImportSyncField()
this.availableThemes = this.themeService.buildAvailableThemes()
}
@@ -67,6 +68,14 @@ export class EditBasicConfigurationComponent implements OnInit, OnChanges {
return { 'disabled-checkbox-extra': !this.isSignupEnabled() }
}
+ isImportVideosHttpEnabled (): boolean {
+ return this.form.value['import']['videos']['http']['enabled'] === true
+ }
+
+ importSynchronizationChecked () {
+ return this.isImportVideosHttpEnabled() && this.form.value['import']['videoChannelSynchronization']['enabled']
+ }
+
hasUnlimitedSignup () {
return this.form.value['signup']['limit'] === -1
}
@@ -97,6 +106,21 @@ export class EditBasicConfigurationComponent implements OnInit, OnChanges {
return this.themeService.getDefaultThemeLabel()
}
+ private checkImportSyncField () {
+ const importSyncControl = this.form.get('import.videoChannelSynchronization.enabled')
+ const importVideosHttpControl = this.form.get('import.videos.http.enabled')
+
+ importVideosHttpControl.valueChanges
+ .subscribe((httpImportEnabled) => {
+ importSyncControl.setValue(httpImportEnabled && importSyncControl.value)
+ if (httpImportEnabled) {
+ importSyncControl.enable()
+ } else {
+ importSyncControl.disable()
+ }
+ })
+ }
+
private checkSignupField () {
const signupControl = this.form.get('signup.enabled')
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
index ce01f8b59..5cab9e9df 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
+++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
@@ -144,6 +144,9 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
torrent: {
enabled: null
}
+ },
+ videoChannelSynchronization: {
+ enabled: null
}
},
trending: {
diff --git a/client/src/app/+admin/system/jobs/jobs.component.ts b/client/src/app/+admin/system/jobs/jobs.component.ts
index 42f503be6..4cda63272 100644
--- a/client/src/app/+admin/system/jobs/jobs.component.ts
+++ b/client/src/app/+admin/system/jobs/jobs.component.ts
@@ -38,7 +38,8 @@ export class JobsComponent extends RestTable implements OnInit {
'video-redundancy',
'video-transcoding',
'videos-views-stats',
- 'move-to-object-storage'
+ 'move-to-object-storage',
+ 'video-channel-import'
]
jobs: Job[] = []
diff --git a/client/src/app/+manage/video-channel-edit/video-channel-edit.component.html b/client/src/app/+manage/video-channel-edit/video-channel-edit.component.html
index b557fb011..b93dc2b12 100644
--- a/client/src/app/+manage/video-channel-edit/video-channel-edit.component.html
+++ b/client/src/app/+manage/video-channel-edit/video-channel-edit.component.html
@@ -61,7 +61,7 @@