+export class RegisterHelpers {
+ private readonly updatedVideoConstants: UpdatedVideoConstant = {
+ playlistPrivacy: { added: [], deleted: [] },
+ privacy: { added: [], deleted: [] },
+ language: { added: [], deleted: [] },
+ licence: { added: [], deleted: [] },
+ category: { added: [], deleted: [] }
+ }
+
+ private readonly transcodingProfiles: {
+ [ npmName: string ]: {
+ type: 'vod' | 'live'
+ encoder: string
+ profile: string
+ }[]
+ } = {}
+
+ private readonly transcodingEncoders: {
+ [ npmName: string ]: {
+ type: 'vod' | 'live'
+ streamType: 'audio' | 'video'
+ encoder: string
+ priority: number
+ }[]
+ } = {}
+
+ private readonly settings: RegisterServerSettingOptions[] = []
+
+ private idAndPassAuths: RegisterServerAuthPassOptions[] = []
+ private externalAuths: RegisterServerAuthExternalOptions[] = []
+
+ private readonly onSettingsChangeCallbacks: ((settings: any) => Promise<any>)[] = []
+
+ private readonly router: express.Router
+
+ constructor (
+ private readonly npmName: string,
+ private readonly plugin: PluginModel,
+ private readonly onHookAdded: (options: RegisterServerHookOptions) => void
+ ) {
+ this.router = express.Router()
+ }
+
+ buildRegisterHelpers (): RegisterServerOptions {
+ const registerHook = this.buildRegisterHook()
+ const registerSetting = this.buildRegisterSetting()
+
+ const getRouter = this.buildGetRouter()
+
+ const settingsManager = this.buildSettingsManager()
+ const storageManager = this.buildStorageManager()