aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/plugins/server/managers
diff options
context:
space:
mode:
Diffstat (limited to 'shared/models/plugins/server/managers')
-rw-r--r--shared/models/plugins/server/managers/index.ts9
-rw-r--r--shared/models/plugins/server/managers/plugin-playlist-privacy-manager.model.ts8
-rw-r--r--shared/models/plugins/server/managers/plugin-settings-manager.model.ts9
-rw-r--r--shared/models/plugins/server/managers/plugin-storage-manager.model.ts5
-rw-r--r--shared/models/plugins/server/managers/plugin-transcoding-manager.model.ts13
-rw-r--r--shared/models/plugins/server/managers/plugin-video-category-manager.model.ts5
-rw-r--r--shared/models/plugins/server/managers/plugin-video-language-manager.model.ts5
-rw-r--r--shared/models/plugins/server/managers/plugin-video-licence-manager.model.ts5
-rw-r--r--shared/models/plugins/server/managers/plugin-video-privacy-manager.model.ts9
9 files changed, 68 insertions, 0 deletions
diff --git a/shared/models/plugins/server/managers/index.ts b/shared/models/plugins/server/managers/index.ts
new file mode 100644
index 000000000..49365a854
--- /dev/null
+++ b/shared/models/plugins/server/managers/index.ts
@@ -0,0 +1,9 @@
1
2export * from './plugin-playlist-privacy-manager.model'
3export * from './plugin-settings-manager.model'
4export * from './plugin-storage-manager.model'
5export * from './plugin-transcoding-manager.model'
6export * from './plugin-video-category-manager.model'
7export * from './plugin-video-language-manager.model'
8export * from './plugin-video-licence-manager.model'
9export * from './plugin-video-privacy-manager.model'
diff --git a/shared/models/plugins/server/managers/plugin-playlist-privacy-manager.model.ts b/shared/models/plugins/server/managers/plugin-playlist-privacy-manager.model.ts
new file mode 100644
index 000000000..4703c0a8b
--- /dev/null
+++ b/shared/models/plugins/server/managers/plugin-playlist-privacy-manager.model.ts
@@ -0,0 +1,8 @@
1import { VideoPlaylistPrivacy } from '../../../videos/playlist/video-playlist-privacy.model'
2
3export interface PluginPlaylistPrivacyManager {
4 // PUBLIC = 1,
5 // UNLISTED = 2,
6 // PRIVATE = 3
7 deletePlaylistPrivacy: (privacyKey: VideoPlaylistPrivacy) => boolean
8}
diff --git a/shared/models/plugins/server/managers/plugin-settings-manager.model.ts b/shared/models/plugins/server/managers/plugin-settings-manager.model.ts
new file mode 100644
index 000000000..3c28c0565
--- /dev/null
+++ b/shared/models/plugins/server/managers/plugin-settings-manager.model.ts
@@ -0,0 +1,9 @@
1export interface PluginSettingsManager {
2 getSetting: (name: string) => Promise<string | boolean>
3
4 getSettings: (names: string[]) => Promise<{ [settingName: string]: string | boolean }>
5
6 setSetting: (name: string, value: string) => Promise<any>
7
8 onSettingsChange: (cb: (names: string[]) => Promise<any>) => void
9}
diff --git a/shared/models/plugins/server/managers/plugin-storage-manager.model.ts b/shared/models/plugins/server/managers/plugin-storage-manager.model.ts
new file mode 100644
index 000000000..51567044a
--- /dev/null
+++ b/shared/models/plugins/server/managers/plugin-storage-manager.model.ts
@@ -0,0 +1,5 @@
1export interface PluginStorageManager {
2 getData: (key: string) => Promise<string>
3
4 storeData: (key: string, data: any) => Promise<any>
5}
diff --git a/shared/models/plugins/server/managers/plugin-transcoding-manager.model.ts b/shared/models/plugins/server/managers/plugin-transcoding-manager.model.ts
new file mode 100644
index 000000000..a0422a460
--- /dev/null
+++ b/shared/models/plugins/server/managers/plugin-transcoding-manager.model.ts
@@ -0,0 +1,13 @@
1import { EncoderOptionsBuilder } from '../../../videos/video-transcoding.model'
2
3export interface PluginTranscodingManager {
4 addLiveProfile (encoder: string, profile: string, builder: EncoderOptionsBuilder): boolean
5
6 addVODProfile (encoder: string, profile: string, builder: EncoderOptionsBuilder): boolean
7
8 addLiveEncoderPriority (streamType: 'audio' | 'video', encoder: string, priority: number): void
9
10 addVODEncoderPriority (streamType: 'audio' | 'video', encoder: string, priority: number): void
11
12 removeAllProfilesAndEncoderPriorities(): void
13}
diff --git a/shared/models/plugins/server/managers/plugin-video-category-manager.model.ts b/shared/models/plugins/server/managers/plugin-video-category-manager.model.ts
new file mode 100644
index 000000000..201bfa979
--- /dev/null
+++ b/shared/models/plugins/server/managers/plugin-video-category-manager.model.ts
@@ -0,0 +1,5 @@
1export interface PluginVideoCategoryManager {
2 addCategory: (categoryKey: number, categoryLabel: string) => boolean
3
4 deleteCategory: (categoryKey: number) => boolean
5}
diff --git a/shared/models/plugins/server/managers/plugin-video-language-manager.model.ts b/shared/models/plugins/server/managers/plugin-video-language-manager.model.ts
new file mode 100644
index 000000000..3fd577a79
--- /dev/null
+++ b/shared/models/plugins/server/managers/plugin-video-language-manager.model.ts
@@ -0,0 +1,5 @@
1export interface PluginVideoLanguageManager {
2 addLanguage: (languageKey: string, languageLabel: string) => boolean
3
4 deleteLanguage: (languageKey: string) => boolean
5}
diff --git a/shared/models/plugins/server/managers/plugin-video-licence-manager.model.ts b/shared/models/plugins/server/managers/plugin-video-licence-manager.model.ts
new file mode 100644
index 000000000..82a634d3a
--- /dev/null
+++ b/shared/models/plugins/server/managers/plugin-video-licence-manager.model.ts
@@ -0,0 +1,5 @@
1export interface PluginVideoLicenceManager {
2 addLicence: (licenceKey: number, licenceLabel: string) => boolean
3
4 deleteLicence: (licenceKey: number) => boolean
5}
diff --git a/shared/models/plugins/server/managers/plugin-video-privacy-manager.model.ts b/shared/models/plugins/server/managers/plugin-video-privacy-manager.model.ts
new file mode 100644
index 000000000..7717115e3
--- /dev/null
+++ b/shared/models/plugins/server/managers/plugin-video-privacy-manager.model.ts
@@ -0,0 +1,9 @@
1import { VideoPrivacy } from '../../../videos/video-privacy.enum'
2
3export interface PluginVideoPrivacyManager {
4 // PUBLIC = 1
5 // UNLISTED = 2
6 // PRIVATE = 3
7 // INTERNAL = 4
8 deletePrivacy: (privacyKey: VideoPrivacy) => boolean
9}