X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=shared%2Fmodels%2Fserver%2Fjob.model.ts;h=9370cf011caedc0bbda00f887259438585c7e9ff;hb=4ec52d04dcc5d664612331f8e08d7d90da990415;hp=6b07eba6913a8baeb3b58ed13fb8792cb8ced8b8;hpb=f012319a644fe8d9d33f2f567fa828442a3b39fd;p=github%2FChocobozzz%2FPeerTube.git diff --git a/shared/models/server/job.model.ts b/shared/models/server/job.model.ts index 6b07eba69..9370cf011 100644 --- a/shared/models/server/job.model.ts +++ b/shared/models/server/job.model.ts @@ -1,5 +1,6 @@ import { ContextType } from '../activitypub/context' -import { VideoEditorTaskCut } from '../videos/editor' +import { VideoState } from '../videos' +import { VideoStudioTaskCut } from '../videos/studio' import { VideoResolution } from '../videos/file/video-resolution.enum' import { SendEmailOptions } from './emailer.model' @@ -22,7 +23,7 @@ export type JobType = | 'actor-keys' | 'manage-video-torrent' | 'move-to-object-storage' - | 'video-edition' + | 'video-studio-edition' export interface Job { id: number @@ -39,9 +40,9 @@ export interface Job { export type ActivitypubHttpBroadcastPayload = { uris: string[] - signatureActorId?: number + contextType: ContextType body: any - contextType?: ContextType + signatureActorId?: number } export type ActivitypubFollowPayload = { @@ -52,7 +53,7 @@ export type ActivitypubFollowPayload = { assertIsChannel?: boolean } -export type FetchType = 'activity' | 'video-likes' | 'video-dislikes' | 'video-shares' | 'video-comments' | 'account-playlists' +export type FetchType = 'activity' | 'video-shares' | 'video-comments' | 'account-playlists' export type ActivitypubHttpFetcherPayload = { uri: string type: FetchType @@ -61,9 +62,9 @@ export type ActivitypubHttpFetcherPayload = { export type ActivitypubHttpUnicastPayload = { uri: string + contextType: ContextType signatureActorId?: number body: object - contextType?: ContextType } export type RefreshPayload = { @@ -158,6 +159,9 @@ export type VideoTranscodingPayload = export interface VideoLiveEndingPayload { videoId: number + publishedAt: string + + replayDirectory?: string } export interface ActorKeysPayload { @@ -171,11 +175,12 @@ export interface DeleteResumableUploadMetaFilePayload { export interface MoveObjectStoragePayload { videoUUID: string isNewVideo: boolean + previousVideoState: VideoState } -export type VideoEditorTaskCutPayload = VideoEditorTaskCut +export type VideoStudioTaskCutPayload = VideoStudioTaskCut -export type VideoEditorTaskIntroPayload = { +export type VideoStudioTaskIntroPayload = { name: 'add-intro' options: { @@ -183,7 +188,7 @@ export type VideoEditorTaskIntroPayload = { } } -export type VideoEditorTaskOutroPayload = { +export type VideoStudioTaskOutroPayload = { name: 'add-outro' options: { @@ -191,7 +196,7 @@ export type VideoEditorTaskOutroPayload = { } } -export type VideoEditorTaskWatermarkPayload = { +export type VideoStudioTaskWatermarkPayload = { name: 'add-watermark' options: { @@ -199,13 +204,13 @@ export type VideoEditorTaskWatermarkPayload = { } } -export type VideoEditionTaskPayload = - VideoEditorTaskCutPayload | - VideoEditorTaskIntroPayload | - VideoEditorTaskOutroPayload | - VideoEditorTaskWatermarkPayload +export type VideoStudioTaskPayload = + VideoStudioTaskCutPayload | + VideoStudioTaskIntroPayload | + VideoStudioTaskOutroPayload | + VideoStudioTaskWatermarkPayload -export interface VideoEditionPayload { +export interface VideoStudioEditionPayload { videoUUID: string - tasks: VideoEditionTaskPayload[] + tasks: VideoStudioTaskPayload[] }