diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-08-25 11:36:23 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-08-25 11:36:23 +0200 |
commit | 93e1258c7cbc0d1235ca6d2a1f7c1875985328b8 (patch) | |
tree | b0a1f77af7ab54dc5f58f569fcd1e9d84b04c533 /shared | |
parent | 69f224587e99d56008e1fa129d0641840a486620 (diff) | |
download | PeerTube-93e1258c7cbc0d1235ca6d2a1f7c1875985328b8.tar.gz PeerTube-93e1258c7cbc0d1235ca6d2a1f7c1875985328b8.tar.zst PeerTube-93e1258c7cbc0d1235ca6d2a1f7c1875985328b8.zip |
Move video file metadata in their own table
Will be used for user video quotas and multiple video resolutions
Diffstat (limited to 'shared')
3 files changed, 20 insertions, 3 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 b6a570e42..98425e4d9 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 | |||
@@ -5,8 +5,6 @@ export interface RemoteVideoCreateData { | |||
5 | author: string | 5 | author: string |
6 | tags: string[] | 6 | tags: string[] |
7 | name: string | 7 | name: string |
8 | extname: string | ||
9 | infoHash: string | ||
10 | category: number | 8 | category: number |
11 | licence: number | 9 | licence: number |
12 | language: number | 10 | language: number |
@@ -19,6 +17,12 @@ export interface RemoteVideoCreateData { | |||
19 | likes: number | 17 | likes: number |
20 | dislikes: number | 18 | dislikes: number |
21 | thumbnailData: string | 19 | thumbnailData: string |
20 | files: { | ||
21 | infoHash: string | ||
22 | extname: string | ||
23 | resolution: number | ||
24 | size: number | ||
25 | }[] | ||
22 | } | 26 | } |
23 | 27 | ||
24 | export interface RemoteVideoCreateRequest extends RemoteVideoRequest { | 28 | export interface RemoteVideoCreateRequest extends RemoteVideoRequest { |
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 805548563..dd3e2ae1a 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,12 @@ export interface RemoteVideoUpdateData { | |||
15 | views: number | 15 | views: number |
16 | likes: number | 16 | likes: number |
17 | dislikes: number | 17 | dislikes: number |
18 | files: { | ||
19 | infoHash: string | ||
20 | extname: string | ||
21 | resolution: number | ||
22 | size: number | ||
23 | }[] | ||
18 | } | 24 | } |
19 | 25 | ||
20 | export interface RemoteVideoUpdateRequest { | 26 | export interface RemoteVideoUpdateRequest { |
diff --git a/shared/models/videos/video.model.ts b/shared/models/videos/video.model.ts index 8aa8ee448..82c8763d0 100644 --- a/shared/models/videos/video.model.ts +++ b/shared/models/videos/video.model.ts | |||
@@ -1,3 +1,10 @@ | |||
1 | export interface VideoFile { | ||
2 | magnetUri: string | ||
3 | resolution: number | ||
4 | resolutionLabel: string | ||
5 | size: number // Bytes | ||
6 | } | ||
7 | |||
1 | export interface Video { | 8 | export interface Video { |
2 | id: number | 9 | id: number |
3 | uuid: string | 10 | uuid: string |
@@ -12,7 +19,6 @@ export interface Video { | |||
12 | description: string | 19 | description: string |
13 | duration: number | 20 | duration: number |
14 | isLocal: boolean | 21 | isLocal: boolean |
15 | magnetUri: string | ||
16 | name: string | 22 | name: string |
17 | podHost: string | 23 | podHost: string |
18 | tags: string[] | 24 | tags: string[] |
@@ -22,4 +28,5 @@ export interface Video { | |||
22 | likes: number | 28 | likes: number |
23 | dislikes: number | 29 | dislikes: number |
24 | nsfw: boolean | 30 | nsfw: boolean |
31 | files: VideoFile[] | ||
25 | } | 32 | } |