]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - shared/models/videos/video.model.ts
Increase upload limit to 8GB (test)
[github/Chocobozzz/PeerTube.git] / shared / models / videos / video.model.ts
CommitLineData
2186386c 1import { VideoResolution, VideoState } from '../../index'
50d6de9c 2import { Account } from '../actors'
b64c950a 3import { Avatar } from '../avatars/avatar.model'
72c7248b 4import { VideoChannel } from './video-channel.model'
fd45e8f4 5import { VideoPrivacy } from './video-privacy.enum'
bbe0f064 6import { VideoScheduleUpdate } from './video-schedule-update.model'
72c7248b 7
ae5a3dd6 8export interface VideoConstant <T> {
9d3ef9fe 9 id: T
ae5a3dd6
C
10 label: string
11}
12
93e1258c
C
13export interface VideoFile {
14 magnetUri: string
09700934 15 resolution: VideoConstant<VideoResolution>
93e1258c 16 size: number // Bytes
a96aed15 17 torrentUrl: string
02756fbd 18 torrentDownloadUrl: string
a96aed15 19 fileUrl: string
02756fbd 20 fileDownloadUrl: string
93e1258c
C
21}
22
69818c93 23export interface Video {
0a6658fd
C
24 id: number
25 uuid: string
d592e0a9
C
26 createdAt: Date | string
27 updatedAt: Date | string
2922e048 28 publishedAt: Date | string
ae5a3dd6
C
29 category: VideoConstant<number>
30 licence: VideoConstant<number>
9d3ef9fe 31 language: VideoConstant<string>
2243730c 32 privacy: VideoConstant<VideoPrivacy>
69f616ab
C
33 description: string
34 duration: number
35 isLocal: boolean
69f616ab 36 name: string
69f616ab 37 thumbnailPath: string
f981dae8 38 previewPath: string
d8755eed 39 embedPath: string
69f616ab
C
40 views: number
41 likes: number
42 dislikes: number
43 nsfw: boolean
b64c950a 44
2186386c
C
45 waitTranscoding?: boolean
46 state?: VideoConstant<VideoState>
bbe0f064 47 scheduledUpdate?: VideoScheduleUpdate
2186386c 48
b64c950a 49 account: {
03e12d7c
C
50 id: number
51 uuid: string
b64c950a
C
52 name: string
53 displayName: string
54 url: string
55 host: string
56 avatar: Avatar
57 }
0f320037
C
58
59 channel: {
60 id: number
61 uuid: string
62 name: string
63 displayName: string
64 url: string
65 host: string
66 avatar: Avatar
67 }
72c7248b
C
68}
69
70export interface VideoDetails extends Video {
fd45e8f4 71 descriptionPath: string
2422c46b 72 support: string
72c7248b 73 channel: VideoChannel
d48ff09d 74 tags: string[]
93e1258c 75 files: VideoFile[]
b1fa3eba 76 account: Account
47564bbe 77 commentsEnabled: boolean
2186386c
C
78
79 // Not optional in details (unlike in Video)
80 waitTranscoding: boolean
81 state: VideoConstant<VideoState>
69818c93 82}