]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/models/videos/video.model.ts
Fix problem with SMTP in default docker-compose setup
[github/Chocobozzz/PeerTube.git] / shared / models / videos / video.model.ts
index 676354ce374095820d8b8292e21e3cead464f7c3..df800461c0b7095e4a58ca8d4a510c4926ffb57c 100644 (file)
@@ -1,13 +1,11 @@
 import { VideoResolution, VideoState } from '../../index'
 import { Account } from '../actors'
 import { Avatar } from '../avatars/avatar.model'
-import { VideoChannel } from './video-channel.model'
+import { VideoChannel } from './channel/video-channel.model'
 import { VideoPrivacy } from './video-privacy.enum'
-
-export interface VideoConstant <T> {
-  id: T
-  label: string
-}
+import { VideoScheduleUpdate } from './video-schedule-update.model'
+import { VideoConstant } from './video-constant.model'
+import { VideoStreamingPlaylist } from './video-streaming-playlist.model'
 
 export interface VideoFile {
   magnetUri: string
@@ -17,6 +15,27 @@ export interface VideoFile {
   torrentDownloadUrl: string
   fileUrl: string
   fileDownloadUrl: string
+  fps: number
+}
+
+export interface VideoChannelAttribute {
+  id: number
+  uuid: string
+  name: string
+  displayName: string
+  url: string
+  host: string
+  avatar?: Avatar
+}
+
+export interface AccountAttribute {
+  id: number
+  uuid: string
+  name: string
+  displayName: string
+  url: string
+  host: string
+  avatar?: Avatar
 }
 
 export interface Video {
@@ -25,6 +44,7 @@ export interface Video {
   createdAt: Date | string
   updatedAt: Date | string
   publishedAt: Date | string
+  originallyPublishedAt: Date | string
   category: VideoConstant<number>
   licence: VideoConstant<number>
   language: VideoConstant<string>
@@ -43,29 +63,16 @@ export interface Video {
 
   waitTranscoding?: boolean
   state?: VideoConstant<VideoState>
-  scheduledUpdate?: {
-    updateAt: Date | string
-    privacy?: VideoPrivacy
-  }
+  scheduledUpdate?: VideoScheduleUpdate
 
-  account: {
-    id: number
-    uuid: string
-    name: string
-    displayName: string
-    url: string
-    host: string
-    avatar: Avatar
-  }
+  blacklisted?: boolean
+  blacklistedReason?: string
+
+  account: AccountAttribute
+  channel: VideoChannelAttribute
 
-  channel: {
-    id: number
-    uuid: string
-    name: string
-    displayName: string
-    url: string
-    host: string
-    avatar: Avatar
+  userHistory?: {
+    currentTime: number
   }
 }
 
@@ -77,8 +84,13 @@ export interface VideoDetails extends Video {
   files: VideoFile[]
   account: Account
   commentsEnabled: boolean
+  downloadEnabled: boolean
 
   // Not optional in details (unlike in Video)
   waitTranscoding: boolean
   state: VideoConstant<VideoState>
+
+  trackerUrls: string[]
+
+  streamingPlaylists: VideoStreamingPlaylist[]
 }