]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - shared/models/videos/video.model.ts
Change models
[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'
59c76ffa 4import { VideoChannel } from './channel/video-channel.model'
fd45e8f4 5import { VideoPrivacy } from './video-privacy.enum'
bbe0f064 6import { VideoScheduleUpdate } from './video-schedule-update.model'
40e87e9e 7import { VideoConstant } from './video-constant.model'
ae5a3dd6 8
93e1258c
C
9export interface VideoFile {
10 magnetUri: string
09700934 11 resolution: VideoConstant<VideoResolution>
93e1258c 12 size: number // Bytes
a96aed15 13 torrentUrl: string
02756fbd 14 torrentDownloadUrl: string
a96aed15 15 fileUrl: string
02756fbd 16 fileDownloadUrl: string
3a6f351b 17 fps: number
93e1258c
C
18}
19
2d3741d6
C
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
69818c93 40export interface Video {
0a6658fd
C
41 id: number
42 uuid: string
d592e0a9
C
43 createdAt: Date | string
44 updatedAt: Date | string
2922e048 45 publishedAt: Date | string
c8034165 46 originallyPublishedAt: Date | string
ae5a3dd6
C
47 category: VideoConstant<number>
48 licence: VideoConstant<number>
9d3ef9fe 49 language: VideoConstant<string>
2243730c 50 privacy: VideoConstant<VideoPrivacy>
69f616ab
C
51 description: string
52 duration: number
53 isLocal: boolean
69f616ab 54 name: string
69f616ab 55 thumbnailPath: string
f981dae8 56 previewPath: string
d8755eed 57 embedPath: string
69f616ab
C
58 views: number
59 likes: number
60 dislikes: number
61 nsfw: boolean
b64c950a 62
2186386c
C
63 waitTranscoding?: boolean
64 state?: VideoConstant<VideoState>
bbe0f064 65 scheduledUpdate?: VideoScheduleUpdate
2186386c 66
26b7305a
C
67 blacklisted?: boolean
68 blacklistedReason?: string
69
2d3741d6
C
70 account: AccountAttribute
71 channel: VideoChannelAttribute
6e46de09
C
72
73 userHistory?: {
74 currentTime: number
75 }
72c7248b
C
76}
77
78export interface VideoDetails extends Video {
fd45e8f4 79 descriptionPath: string
2422c46b 80 support: string
72c7248b 81 channel: VideoChannel
d48ff09d 82 tags: string[]
93e1258c 83 files: VideoFile[]
b1fa3eba 84 account: Account
47564bbe 85 commentsEnabled: boolean
2186386c
C
86
87 // Not optional in details (unlike in Video)
88 waitTranscoding: boolean
89 state: VideoConstant<VideoState>
69818c93 90}