]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - shared/models/videos/video.model.ts
Fix bad RSS descriptions when filtering videos by account or channel
[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'
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 16 torrentUrl: string
02756fbd 17 torrentDownloadUrl: string
a96aed15 18 fileUrl: string
02756fbd 19 fileDownloadUrl: string
93e1258c
C
20}
21
69818c93 22export interface Video {
0a6658fd
C
23 id: number
24 uuid: string
d592e0a9
C
25 createdAt: Date | string
26 updatedAt: Date | string
2922e048 27 publishedAt: Date | string
ae5a3dd6
C
28 category: VideoConstant<number>
29 licence: VideoConstant<number>
9d3ef9fe 30 language: VideoConstant<string>
2243730c 31 privacy: VideoConstant<VideoPrivacy>
69f616ab
C
32 description: string
33 duration: number
34 isLocal: boolean
69f616ab 35 name: string
69f616ab 36 thumbnailPath: string
f981dae8 37 previewPath: string
d8755eed 38 embedPath: string
69f616ab
C
39 views: number
40 likes: number
41 dislikes: number
42 nsfw: boolean
b64c950a 43
2186386c
C
44 waitTranscoding?: boolean
45 state?: VideoConstant<VideoState>
46
b64c950a 47 account: {
03e12d7c
C
48 id: number
49 uuid: string
b64c950a
C
50 name: string
51 displayName: string
52 url: string
53 host: string
54 avatar: Avatar
55 }
0f320037
C
56
57 channel: {
58 id: number
59 uuid: string
60 name: string
61 displayName: string
62 url: string
63 host: string
64 avatar: Avatar
65 }
72c7248b
C
66}
67
68export interface VideoDetails extends Video {
fd45e8f4 69 descriptionPath: string
2422c46b 70 support: string
72c7248b 71 channel: VideoChannel
d48ff09d 72 tags: string[]
93e1258c 73 files: VideoFile[]
b1fa3eba 74 account: Account
47564bbe 75 commentsEnabled: boolean
2186386c
C
76
77 // Not optional in details (unlike in Video)
78 waitTranscoding: boolean
79 state: VideoConstant<VideoState>
69818c93 80}