diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-10-31 11:52:52 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-10-31 11:53:13 +0100 |
commit | fd45e8f43c2638478599ca75632518054461da85 (patch) | |
tree | 01e1fb5ddad53bde8fb2c48f348fb8add51cfdb3 /shared | |
parent | b7a485121d71c95fcf5e432e4cc745cf91af4f93 (diff) | |
download | PeerTube-fd45e8f43c2638478599ca75632518054461da85.tar.gz PeerTube-fd45e8f43c2638478599ca75632518054461da85.tar.zst PeerTube-fd45e8f43c2638478599ca75632518054461da85.zip |
Add video privacy setting
Diffstat (limited to 'shared')
-rw-r--r-- | shared/models/pods/remote-video/remote-video-create-request.model.ts | 1 | ||||
-rw-r--r-- | shared/models/pods/remote-video/remote-video-update-request.model.ts | 1 | ||||
-rw-r--r-- | shared/models/videos/index.ts | 1 | ||||
-rw-r--r-- | shared/models/videos/video-create.model.ts | 3 | ||||
-rw-r--r-- | shared/models/videos/video-privacy.enum.ts | 5 | ||||
-rw-r--r-- | shared/models/videos/video-update.model.ts | 3 | ||||
-rw-r--r-- | shared/models/videos/video.model.ts | 5 |
7 files changed, 18 insertions, 1 deletions
diff --git a/shared/models/pods/remote-video/remote-video-create-request.model.ts b/shared/models/pods/remote-video/remote-video-create-request.model.ts index cb20dfa03..9a382e654 100644 --- a/shared/models/pods/remote-video/remote-video-create-request.model.ts +++ b/shared/models/pods/remote-video/remote-video-create-request.model.ts | |||
@@ -16,6 +16,7 @@ export interface RemoteVideoCreateData { | |||
16 | views: number | 16 | views: number |
17 | likes: number | 17 | likes: number |
18 | dislikes: number | 18 | dislikes: number |
19 | privacy: number | ||
19 | thumbnailData: string | 20 | thumbnailData: string |
20 | files: { | 21 | files: { |
21 | infoHash: string | 22 | infoHash: string |
diff --git a/shared/models/pods/remote-video/remote-video-update-request.model.ts b/shared/models/pods/remote-video/remote-video-update-request.model.ts index 8439cfa24..924489c75 100644 --- a/shared/models/pods/remote-video/remote-video-update-request.model.ts +++ b/shared/models/pods/remote-video/remote-video-update-request.model.ts | |||
@@ -15,6 +15,7 @@ export interface RemoteVideoUpdateData { | |||
15 | views: number | 15 | views: number |
16 | likes: number | 16 | likes: number |
17 | dislikes: number | 17 | dislikes: number |
18 | privacy: number | ||
18 | files: { | 19 | files: { |
19 | infoHash: string | 20 | infoHash: string |
20 | extname: string | 21 | extname: string |
diff --git a/shared/models/videos/index.ts b/shared/models/videos/index.ts index 2a3912f06..14a10f5d8 100644 --- a/shared/models/videos/index.ts +++ b/shared/models/videos/index.ts | |||
@@ -8,6 +8,7 @@ export * from './video-channel-create.model' | |||
8 | export * from './video-channel-update.model' | 8 | export * from './video-channel-update.model' |
9 | export * from './video-channel.model' | 9 | export * from './video-channel.model' |
10 | export * from './video-create.model' | 10 | export * from './video-create.model' |
11 | export * from './video-privacy.enum' | ||
11 | export * from './video-rate.type' | 12 | export * from './video-rate.type' |
12 | export * from './video-resolution.enum' | 13 | export * from './video-resolution.enum' |
13 | export * from './video-update.model' | 14 | export * from './video-update.model' |
diff --git a/shared/models/videos/video-create.model.ts b/shared/models/videos/video-create.model.ts index 4d0e83520..e537c38a8 100644 --- a/shared/models/videos/video-create.model.ts +++ b/shared/models/videos/video-create.model.ts | |||
@@ -1,3 +1,5 @@ | |||
1 | import { VideoPrivacy } from './video-privacy.enum' | ||
2 | |||
1 | export interface VideoCreate { | 3 | export interface VideoCreate { |
2 | category: number | 4 | category: number |
3 | licence: number | 5 | licence: number |
@@ -7,4 +9,5 @@ export interface VideoCreate { | |||
7 | nsfw: boolean | 9 | nsfw: boolean |
8 | name: string | 10 | name: string |
9 | tags: string[] | 11 | tags: string[] |
12 | privacy: VideoPrivacy | ||
10 | } | 13 | } |
diff --git a/shared/models/videos/video-privacy.enum.ts b/shared/models/videos/video-privacy.enum.ts new file mode 100644 index 000000000..29888c7b8 --- /dev/null +++ b/shared/models/videos/video-privacy.enum.ts | |||
@@ -0,0 +1,5 @@ | |||
1 | export enum VideoPrivacy { | ||
2 | PUBLIC = 1, | ||
3 | UNLISTED = 2, | ||
4 | PRIVATE = 3 | ||
5 | } | ||
diff --git a/shared/models/videos/video-update.model.ts b/shared/models/videos/video-update.model.ts index 29a82621b..0cf38fe6e 100644 --- a/shared/models/videos/video-update.model.ts +++ b/shared/models/videos/video-update.model.ts | |||
@@ -1,9 +1,12 @@ | |||
1 | import { VideoPrivacy } from './video-privacy.enum' | ||
2 | |||
1 | export interface VideoUpdate { | 3 | export interface VideoUpdate { |
2 | name?: string | 4 | name?: string |
3 | category?: number | 5 | category?: number |
4 | licence?: number | 6 | licence?: number |
5 | language?: number | 7 | language?: number |
6 | description?: string | 8 | description?: string |
9 | privacy?: VideoPrivacy | ||
7 | tags?: string[] | 10 | tags?: string[] |
8 | nsfw?: boolean | 11 | nsfw?: boolean |
9 | } | 12 | } |
diff --git a/shared/models/videos/video.model.ts b/shared/models/videos/video.model.ts index 1490d345c..2f4ee2462 100644 --- a/shared/models/videos/video.model.ts +++ b/shared/models/videos/video.model.ts | |||
@@ -1,4 +1,5 @@ | |||
1 | import { VideoChannel } from './video-channel.model' | 1 | import { VideoChannel } from './video-channel.model' |
2 | import { VideoPrivacy } from './video-privacy.enum' | ||
2 | 3 | ||
3 | export interface VideoFile { | 4 | export interface VideoFile { |
4 | magnetUri: string | 5 | magnetUri: string |
@@ -37,7 +38,9 @@ export interface Video { | |||
37 | } | 38 | } |
38 | 39 | ||
39 | export interface VideoDetails extends Video { | 40 | export interface VideoDetails extends Video { |
40 | descriptionPath: string, | 41 | privacy: VideoPrivacy |
42 | privacyLabel: string | ||
43 | descriptionPath: string | ||
41 | channel: VideoChannel | 44 | channel: VideoChannel |
42 | files: VideoFile[] | 45 | files: VideoFile[] |
43 | } | 46 | } |