projects
/
oweals
/
peertube.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add recently added redundancy strategy
[oweals/peertube.git]
/
shared
/
models
/
videos
/
video.model.ts
diff --git
a/shared/models/videos/video.model.ts
b/shared/models/videos/video.model.ts
index 0606f1aec53cd17099b2463416a8a735b26cd721..b47ab1ab8c1e0a0a7ff9e3da413fe55f82701adf 100644
(file)
--- a/
shared/models/videos/video.model.ts
+++ b/
shared/models/videos/video.model.ts
@@
-1,33
+1,56
@@
-import { VideoChannel } from './video-channel.model'
+import { VideoResolution, VideoState } from '../../index'
+import { Account } from '../actors'
+import { Avatar } from '../avatars/avatar.model'
+import { VideoChannel } from './channel/video-channel.model'
import { VideoPrivacy } from './video-privacy.enum'
import { VideoPrivacy } from './video-privacy.enum'
+import { VideoScheduleUpdate } from './video-schedule-update.model'
+import { VideoConstant } from './video-constant.model'
export interface VideoFile {
magnetUri: string
export interface VideoFile {
magnetUri: string
- resolution: number
- resolutionLabel: string
+ resolution: VideoConstant<VideoResolution>
size: number // Bytes
torrentUrl: string
size: number // Bytes
torrentUrl: string
+ torrentDownloadUrl: string
fileUrl: 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 {
id: number
uuid: string
}
export interface Video {
id: number
uuid: string
- account: string
createdAt: Date | string
updatedAt: Date | string
createdAt: Date | string
updatedAt: Date | string
- categoryLabel: string
- category: number
- licenceLabel: string
- licence: number
- languageLabel: string
- language: number
+ publishedAt: Date | string
+ category: VideoConstant<number>
+ licence: VideoConstant<number>
+ language: VideoConstant<string>
+ privacy: VideoConstant<VideoPrivacy>
description: string
duration: number
isLocal: boolean
name: string
description: string
duration: number
isLocal: boolean
name: string
- podHost: string
- tags: string[]
thumbnailPath: string
previewPath: string
embedPath: string
thumbnailPath: string
previewPath: string
embedPath: string
@@
-35,12
+58,28
@@
export interface Video {
likes: number
dislikes: number
nsfw: boolean
likes: number
dislikes: number
nsfw: boolean
+
+ waitTranscoding?: boolean
+ state?: VideoConstant<VideoState>
+ scheduledUpdate?: VideoScheduleUpdate
+
+ blacklisted?: boolean
+ blacklistedReason?: string
+
+ account: AccountAttribute
+ channel: VideoChannelAttribute
}
export interface VideoDetails extends Video {
}
export interface VideoDetails extends Video {
- privacy: VideoPrivacy
- privacyLabel: string
descriptionPath: string
descriptionPath: string
+ support: string
channel: VideoChannel
channel: VideoChannel
+ tags: string[]
files: VideoFile[]
files: VideoFile[]
+ account: Account
+ commentsEnabled: boolean
+
+ // Not optional in details (unlike in Video)
+ waitTranscoding: boolean
+ state: VideoConstant<VideoState>
}
}