import { catchError, first, map, shareReplay } from 'rxjs/operators'
import { HttpClient } from '@angular/common/http'
import { Inject, Injectable, LOCALE_ID, NgZone } from '@angular/core'
+import { VideoEditType } from '@app/+videos/+video-edit/shared/video-edit.type'
import { AuthService } from '@app/core/auth'
import { Notifier } from '@app/core/notification'
import { MarkdownService } from '@app/core/renderer'
: PluginType.THEME
}
- getRegisteredVideoFormFields (type: 'import-url' | 'import-torrent' | 'upload' | 'update') {
+ getRegisteredVideoFormFields (type: VideoEditType) {
return this.formFields.video.filter(f => f.videoFormOptions.type === type)
}
.toPromise()
},
+ getServerConfig: () => {
+ return this.server.getConfig()
+ .pipe(catchError(res => this.restExtractor.handleError(res)))
+ .toPromise()
+ },
+
isLoggedIn: () => {
return this.authService.isLoggedIn()
},