mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Add video channels
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
export * from './remote-qadu-video-request.model'
|
||||
export * from './remote-video-author-create-request.model'
|
||||
export * from './remote-video-author-remove-request.model'
|
||||
export * from './remote-video-event-request.model'
|
||||
export * from './remote-video-request.model'
|
||||
export * from './remote-video-create-request.model'
|
||||
export * from './remote-video-update-request.model'
|
||||
export * from './remote-video-remove-request.model'
|
||||
export * from './remote-video-channel-create-request.model'
|
||||
export * from './remote-video-channel-update-request.model'
|
||||
export * from './remote-video-channel-remove-request.model'
|
||||
export * from './remote-video-report-abuse-request.model'
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import { RemoteVideoRequest } from './remote-video-request.model'
|
||||
|
||||
export interface RemoteVideoAuthorCreateData {
|
||||
uuid: string
|
||||
name: string
|
||||
}
|
||||
|
||||
export interface RemoteVideoAuthorCreateRequest extends RemoteVideoRequest {
|
||||
type: 'add-author'
|
||||
data: RemoteVideoAuthorCreateData
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import { RemoteVideoRequest } from './remote-video-request.model'
|
||||
|
||||
export interface RemoteVideoAuthorRemoveData {
|
||||
uuid: string
|
||||
}
|
||||
|
||||
export interface RemoteVideoAuthorRemoveRequest extends RemoteVideoRequest {
|
||||
type: 'remove-author'
|
||||
data: RemoteVideoAuthorRemoveData
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import { RemoteVideoRequest } from './remote-video-request.model'
|
||||
|
||||
export interface RemoteVideoChannelCreateData {
|
||||
uuid: string
|
||||
name: string
|
||||
description: string
|
||||
createdAt: Date
|
||||
updatedAt: Date
|
||||
ownerUUID: string
|
||||
}
|
||||
|
||||
export interface RemoteVideoChannelCreateRequest extends RemoteVideoRequest {
|
||||
type: 'add-channel'
|
||||
data: RemoteVideoChannelCreateData
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import { RemoteVideoRequest } from './remote-video-request.model'
|
||||
|
||||
export interface RemoteVideoChannelRemoveData {
|
||||
uuid: string
|
||||
}
|
||||
|
||||
export interface RemoteVideoChannelRemoveRequest extends RemoteVideoRequest {
|
||||
type: 'remove-channel'
|
||||
data: RemoteVideoChannelRemoveData
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import { RemoteVideoRequest } from './remote-video-request.model'
|
||||
|
||||
export interface RemoteVideoChannelUpdateData {
|
||||
uuid: string
|
||||
name: string
|
||||
description: string
|
||||
createdAt: Date
|
||||
updatedAt: Date
|
||||
ownerUUID: string
|
||||
}
|
||||
|
||||
export interface RemoteVideoChannelUpdateRequest extends RemoteVideoRequest {
|
||||
type: 'update-channel'
|
||||
data: RemoteVideoChannelUpdateData
|
||||
}
|
||||
@@ -2,7 +2,7 @@ import { RemoteVideoRequest } from './remote-video-request.model'
|
||||
|
||||
export interface RemoteVideoCreateData {
|
||||
uuid: string
|
||||
author: string
|
||||
channelUUID: string
|
||||
tags: string[]
|
||||
name: string
|
||||
category: number
|
||||
@@ -26,6 +26,6 @@ export interface RemoteVideoCreateData {
|
||||
}
|
||||
|
||||
export interface RemoteVideoCreateRequest extends RemoteVideoRequest {
|
||||
type: 'add'
|
||||
type: 'add-video'
|
||||
data: RemoteVideoCreateData
|
||||
}
|
||||
|
||||
@@ -5,6 +5,6 @@ export interface RemoteVideoRemoveData {
|
||||
}
|
||||
|
||||
export interface RemoteVideoRemoveRequest extends RemoteVideoRequest {
|
||||
type: 'remove'
|
||||
type: 'remove-video'
|
||||
data: RemoteVideoRemoveData
|
||||
}
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
export interface RemoteVideoRequest {
|
||||
type: 'add' | 'update' | 'remove' | 'report-abuse'
|
||||
type: RemoteVideoRequestType
|
||||
data: any
|
||||
}
|
||||
|
||||
export type RemoteVideoRequestType = 'add-video' | 'update-video' | 'remove-video' |
|
||||
'add-channel' | 'update-channel' | 'remove-channel' |
|
||||
'report-abuse' |
|
||||
'add-author' | 'remove-author'
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { RemoteVideoRequest } from './remote-video-request.model'
|
||||
|
||||
export interface RemoteVideoUpdateData {
|
||||
uuid: string
|
||||
tags: string[]
|
||||
@@ -21,7 +23,7 @@ export interface RemoteVideoUpdateData {
|
||||
}[]
|
||||
}
|
||||
|
||||
export interface RemoteVideoUpdateRequest {
|
||||
type: 'update'
|
||||
export interface RemoteVideoUpdateRequest extends RemoteVideoRequest {
|
||||
type: 'update-video'
|
||||
data: RemoteVideoUpdateData
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { UserRole } from './user-role.type'
|
||||
import { VideoChannel } from '../videos/video-channel.model'
|
||||
|
||||
export interface User {
|
||||
id: number
|
||||
@@ -7,5 +8,10 @@ export interface User {
|
||||
displayNSFW: boolean
|
||||
role: UserRole
|
||||
videoQuota: number
|
||||
createdAt: Date
|
||||
createdAt: Date,
|
||||
author: {
|
||||
id: number
|
||||
uuid: string
|
||||
}
|
||||
videoChannels?: VideoChannel[]
|
||||
}
|
||||
|
||||
@@ -4,6 +4,9 @@ export * from './user-video-rate.type'
|
||||
export * from './video-abuse-create.model'
|
||||
export * from './video-abuse.model'
|
||||
export * from './video-blacklist.model'
|
||||
export * from './video-channel-create.model'
|
||||
export * from './video-channel-update.model'
|
||||
export * from './video-channel.model'
|
||||
export * from './video-create.model'
|
||||
export * from './video-rate.type'
|
||||
export * from './video-resolution.enum'
|
||||
|
||||
4
shared/models/videos/video-channel-create.model.ts
Normal file
4
shared/models/videos/video-channel-create.model.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export interface VideoChannelCreate {
|
||||
name: string
|
||||
description?: string
|
||||
}
|
||||
4
shared/models/videos/video-channel-update.model.ts
Normal file
4
shared/models/videos/video-channel-update.model.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export interface VideoChannelUpdate {
|
||||
name: string
|
||||
description: string
|
||||
}
|
||||
15
shared/models/videos/video-channel.model.ts
Normal file
15
shared/models/videos/video-channel.model.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { Video } from './video.model'
|
||||
|
||||
export interface VideoChannel {
|
||||
id: number
|
||||
name: string
|
||||
description: string
|
||||
isLocal: boolean
|
||||
createdAt: Date | string
|
||||
updatedAt: Date | string
|
||||
owner?: {
|
||||
name: string
|
||||
uuid: string
|
||||
}
|
||||
videos?: Video[]
|
||||
}
|
||||
@@ -3,6 +3,7 @@ export interface VideoCreate {
|
||||
licence: number
|
||||
language: number
|
||||
description: string
|
||||
channelId: number
|
||||
nsfw: boolean
|
||||
name: string
|
||||
tags: string[]
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { VideoChannel } from './video-channel.model'
|
||||
|
||||
export interface VideoFile {
|
||||
magnetUri: string
|
||||
resolution: number
|
||||
@@ -32,5 +34,9 @@ export interface Video {
|
||||
likes: number
|
||||
dislikes: number
|
||||
nsfw: boolean
|
||||
}
|
||||
|
||||
export interface VideoDetails extends Video {
|
||||
channel: VideoChannel
|
||||
files: VideoFile[]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user