]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - shared/models/videos/video.model.ts
Add ability to update a video channel
[github/Chocobozzz/PeerTube.git] / shared / models / videos / video.model.ts
CommitLineData
09700934 1import { VideoResolution } 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'
72c7248b 6
ae5a3dd6 7export interface VideoConstant <T> {
9d3ef9fe 8 id: T
ae5a3dd6
C
9 label: string
10}
11
93e1258c
C
12export interface VideoFile {
13 magnetUri: string
09700934 14 resolution: VideoConstant<VideoResolution>
93e1258c 15 size: number // Bytes
a96aed15
C
16 torrentUrl: string
17 fileUrl: string
93e1258c
C
18}
19
69818c93 20export interface Video {
0a6658fd
C
21 id: number
22 uuid: string
d592e0a9
C
23 createdAt: Date | string
24 updatedAt: Date | string
2922e048 25 publishedAt: Date | string
ae5a3dd6
C
26 category: VideoConstant<number>
27 licence: VideoConstant<number>
9d3ef9fe 28 language: VideoConstant<string>
2243730c 29 privacy: VideoConstant<VideoPrivacy>
69f616ab
C
30 description: string
31 duration: number
32 isLocal: boolean
69f616ab 33 name: string
69f616ab 34 thumbnailPath: string
f981dae8 35 previewPath: string
d8755eed 36 embedPath: string
69f616ab
C
37 views: number
38 likes: number
39 dislikes: number
40 nsfw: boolean
b64c950a
C
41
42 account: {
03e12d7c
C
43 id: number
44 uuid: string
b64c950a
C
45 name: string
46 displayName: string
47 url: string
48 host: string
49 avatar: Avatar
50 }
0f320037
C
51
52 channel: {
53 id: number
54 uuid: string
55 name: string
56 displayName: string
57 url: string
58 host: string
59 avatar: Avatar
60 }
72c7248b
C
61}
62
63export interface VideoDetails extends Video {
fd45e8f4 64 descriptionPath: string
2422c46b 65 support: string
72c7248b 66 channel: VideoChannel
d48ff09d 67 tags: string[]
93e1258c 68 files: VideoFile[]
b1fa3eba 69 account: Account
47564bbe 70 commentsEnabled: boolean
69818c93 71}