From a9bfa85d2cdf13670aaced740da5b493fbeddfce Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 15 Dec 2021 15:58:10 +0100 Subject: Add ability for admins to set default p2p policy --- shared/models/server/server-config.model.ts | 4 ++++ shared/models/users/user-update-me.model.ts | 3 +++ shared/models/users/user.model.ts | 4 ++++ 3 files changed, 11 insertions(+) (limited to 'shared/models') diff --git a/shared/models/server/server-config.model.ts b/shared/models/server/server-config.model.ts index 9c3dcd6d3..71540e603 100644 --- a/shared/models/server/server-config.model.ts +++ b/shared/models/server/server-config.model.ts @@ -55,6 +55,10 @@ export interface ServerConfig { privacy: VideoPrivacy licence: number } + + p2p: { + enabled: boolean + } } webadmin: { diff --git a/shared/models/users/user-update-me.model.ts b/shared/models/users/user-update-me.model.ts index 6d7df38fb..e664e44b5 100644 --- a/shared/models/users/user-update-me.model.ts +++ b/shared/models/users/user-update-me.model.ts @@ -5,7 +5,10 @@ export interface UserUpdateMe { description?: string nsfwPolicy?: NSFWPolicyType + // FIXME: deprecated in favour of p2pEnabled in 4.1 webTorrentEnabled?: boolean + p2pEnabled?: boolean + autoPlayVideo?: boolean autoPlayNextVideo?: boolean autoPlayNextVideoPlaylist?: boolean diff --git a/shared/models/users/user.model.ts b/shared/models/users/user.model.ts index 78870c556..63c5c8a92 100644 --- a/shared/models/users/user.model.ts +++ b/shared/models/users/user.model.ts @@ -20,7 +20,11 @@ export interface User { autoPlayVideo: boolean autoPlayNextVideo: boolean autoPlayNextVideoPlaylist: boolean + + // @deprecated in favour of p2pEnabled webTorrentEnabled: boolean + p2pEnabled: boolean + videosHistoryEnabled: boolean videoLanguages: string[] -- cgit v1.2.3