]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame_incremental - shared/models/videos/video.model.ts
Add ability to update a video channel
[github/Chocobozzz/PeerTube.git] / shared / models / videos / video.model.ts
... / ...
CommitLineData
1import { VideoResolution } from '../../index'
2import { Account } from '../actors'
3import { Avatar } from '../avatars/avatar.model'
4import { VideoChannel } from './video-channel.model'
5import { VideoPrivacy } from './video-privacy.enum'
6
7export interface VideoConstant <T> {
8 id: T
9 label: string
10}
11
12export interface VideoFile {
13 magnetUri: string
14 resolution: VideoConstant<VideoResolution>
15 size: number // Bytes
16 torrentUrl: string
17 fileUrl: string
18}
19
20export interface Video {
21 id: number
22 uuid: string
23 createdAt: Date | string
24 updatedAt: Date | string
25 publishedAt: Date | string
26 category: VideoConstant<number>
27 licence: VideoConstant<number>
28 language: VideoConstant<string>
29 privacy: VideoConstant<VideoPrivacy>
30 description: string
31 duration: number
32 isLocal: boolean
33 name: string
34 thumbnailPath: string
35 previewPath: string
36 embedPath: string
37 views: number
38 likes: number
39 dislikes: number
40 nsfw: boolean
41
42 account: {
43 id: number
44 uuid: string
45 name: string
46 displayName: string
47 url: string
48 host: string
49 avatar: Avatar
50 }
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 }
61}
62
63export interface VideoDetails extends Video {
64 descriptionPath: string
65 support: string
66 channel: VideoChannel
67 tags: string[]
68 files: VideoFile[]
69 account: Account
70 commentsEnabled: boolean
71}