]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - shared/models/videos/video.model.ts
Fix import with when the imported file has the same extension than an
[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 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
C
43
44 account: {
03e12d7c
C
45 id: number
46 uuid: string
b64c950a
C
47 name: string
48 displayName: string
49 url: string
50 host: string
51 avatar: Avatar
52 }
0f320037
C
53
54 channel: {
55 id: number
56 uuid: string
57 name: string
58 displayName: string
59 url: string
60 host: string
61 avatar: Avatar
62 }
72c7248b
C
63}
64
65export interface VideoDetails extends Video {
fd45e8f4 66 descriptionPath: string
2422c46b 67 support: string
72c7248b 68 channel: VideoChannel
d48ff09d 69 tags: string[]
93e1258c 70 files: VideoFile[]
b1fa3eba 71 account: Account
47564bbe 72 commentsEnabled: boolean
69818c93 73}