]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame_incremental - shared/models/videos/video.model.ts
Add downloadingEnabled property to video model
[github/Chocobozzz/PeerTube.git] / shared / models / videos / video.model.ts
... / ...
CommitLineData
1import { VideoResolution, VideoState } from '../../index'
2import { Account } from '../actors'
3import { Avatar } from '../avatars/avatar.model'
4import { VideoChannel } from './channel/video-channel.model'
5import { VideoPrivacy } from './video-privacy.enum'
6import { VideoScheduleUpdate } from './video-schedule-update.model'
7import { VideoConstant } from './video-constant.model'
8
9export interface VideoFile {
10 magnetUri: string
11 resolution: VideoConstant<VideoResolution>
12 size: number // Bytes
13 torrentUrl: string
14 torrentDownloadUrl: string
15 fileUrl: string
16 fileDownloadUrl: string
17 fps: number
18}
19
20export interface VideoChannelAttribute {
21 id: number
22 uuid: string
23 name: string
24 displayName: string
25 url: string
26 host: string
27 avatar: Avatar
28}
29
30export interface AccountAttribute {
31 id: number
32 uuid: string
33 name: string
34 displayName: string
35 url: string
36 host: string
37 avatar: Avatar
38}
39
40export interface Video {
41 id: number
42 uuid: string
43 createdAt: Date | string
44 updatedAt: Date | string
45 publishedAt: Date | string
46 category: VideoConstant<number>
47 licence: VideoConstant<number>
48 language: VideoConstant<string>
49 privacy: VideoConstant<VideoPrivacy>
50 description: string
51 duration: number
52 isLocal: boolean
53 name: string
54 thumbnailPath: string
55 previewPath: string
56 embedPath: string
57 views: number
58 likes: number
59 dislikes: number
60 nsfw: boolean
61
62 waitTranscoding?: boolean
63 state?: VideoConstant<VideoState>
64 scheduledUpdate?: VideoScheduleUpdate
65
66 blacklisted?: boolean
67 blacklistedReason?: string
68
69 account: AccountAttribute
70 channel: VideoChannelAttribute
71
72 userHistory?: {
73 currentTime: number
74 }
75}
76
77export interface VideoDetails extends Video {
78 descriptionPath: string
79 support: string
80 channel: VideoChannel
81 tags: string[]
82 files: VideoFile[]
83 account: Account
84 commentsEnabled: boolean
85 downloadingEnabled: boolean
86
87 // Not optional in details (unlike in Video)
88 waitTranscoding: boolean
89 state: VideoConstant<VideoState>
90}