diff options
Diffstat (limited to 'shared')
-rw-r--r-- | shared/models/server/custom-config.model.ts | 2 | ||||
-rw-r--r-- | shared/models/server/job.model.ts | 29 | ||||
-rw-r--r-- | shared/models/server/server-config.model.ts | 2 | ||||
-rw-r--r-- | shared/models/users/user-notification-setting.model.ts | 2 | ||||
-rw-r--r-- | shared/models/users/user-notification.model.ts | 2 | ||||
-rw-r--r-- | shared/models/videos/editor/index.ts | 1 | ||||
-rw-r--r-- | shared/models/videos/editor/video-editor-create-edit.model.ts | 42 | ||||
-rw-r--r-- | shared/models/videos/index.ts | 2 | ||||
-rw-r--r-- | shared/models/videos/studio/index.ts | 1 | ||||
-rw-r--r-- | shared/models/videos/studio/video-studio-create-edit.model.ts | 42 | ||||
-rw-r--r-- | shared/server-commands/server/config-command.ts | 8 | ||||
-rw-r--r-- | shared/server-commands/server/server.ts | 6 | ||||
-rw-r--r-- | shared/server-commands/videos/index.ts | 2 | ||||
-rw-r--r-- | shared/server-commands/videos/video-studio-command.ts (renamed from shared/server-commands/videos/video-editor-command.ts) | 10 |
14 files changed, 74 insertions, 77 deletions
diff --git a/shared/models/server/custom-config.model.ts b/shared/models/server/custom-config.model.ts index 5df606566..ab83ed497 100644 --- a/shared/models/server/custom-config.model.ts +++ b/shared/models/server/custom-config.model.ts | |||
@@ -147,7 +147,7 @@ export interface CustomConfig { | |||
147 | } | 147 | } |
148 | } | 148 | } |
149 | 149 | ||
150 | videoEditor: { | 150 | videoStudio: { |
151 | enabled: boolean | 151 | enabled: boolean |
152 | } | 152 | } |
153 | 153 | ||
diff --git a/shared/models/server/job.model.ts b/shared/models/server/job.model.ts index 3b4855eaa..91469d010 100644 --- a/shared/models/server/job.model.ts +++ b/shared/models/server/job.model.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { ContextType } from '../activitypub/context' | 1 | import { ContextType } from '../activitypub/context' |
2 | import { VideoState } from '../videos' | 2 | import { VideoState } from '../videos' |
3 | import { VideoEditorTaskCut } from '../videos/editor' | 3 | import { VideoStudioTaskCut } from '../videos/studio' |
4 | import { VideoResolution } from '../videos/file/video-resolution.enum' | 4 | import { VideoResolution } from '../videos/file/video-resolution.enum' |
5 | import { SendEmailOptions } from './emailer.model' | 5 | import { SendEmailOptions } from './emailer.model' |
6 | 6 | ||
@@ -23,7 +23,7 @@ export type JobType = | |||
23 | | 'actor-keys' | 23 | | 'actor-keys' |
24 | | 'manage-video-torrent' | 24 | | 'manage-video-torrent' |
25 | | 'move-to-object-storage' | 25 | | 'move-to-object-storage' |
26 | | 'video-edition' | 26 | | 'video-studio-edition' |
27 | 27 | ||
28 | export interface Job { | 28 | export interface Job { |
29 | id: number | 29 | id: number |
@@ -117,9 +117,6 @@ export type ManageVideoTorrentPayload = | |||
117 | interface BaseTranscodingPayload { | 117 | interface BaseTranscodingPayload { |
118 | videoUUID: string | 118 | videoUUID: string |
119 | isNewVideo?: boolean | 119 | isNewVideo?: boolean |
120 | |||
121 | // Custom notification when the task is finished | ||
122 | notification?: 'default' | 'video-edition' | ||
123 | } | 120 | } |
124 | 121 | ||
125 | export interface HLSTranscodingPayload extends BaseTranscodingPayload { | 122 | export interface HLSTranscodingPayload extends BaseTranscodingPayload { |
@@ -178,9 +175,9 @@ export interface MoveObjectStoragePayload { | |||
178 | previousVideoState: VideoState | 175 | previousVideoState: VideoState |
179 | } | 176 | } |
180 | 177 | ||
181 | export type VideoEditorTaskCutPayload = VideoEditorTaskCut | 178 | export type VideoStudioTaskCutPayload = VideoStudioTaskCut |
182 | 179 | ||
183 | export type VideoEditorTaskIntroPayload = { | 180 | export type VideoStudioTaskIntroPayload = { |
184 | name: 'add-intro' | 181 | name: 'add-intro' |
185 | 182 | ||
186 | options: { | 183 | options: { |
@@ -188,7 +185,7 @@ export type VideoEditorTaskIntroPayload = { | |||
188 | } | 185 | } |
189 | } | 186 | } |
190 | 187 | ||
191 | export type VideoEditorTaskOutroPayload = { | 188 | export type VideoStudioTaskOutroPayload = { |
192 | name: 'add-outro' | 189 | name: 'add-outro' |
193 | 190 | ||
194 | options: { | 191 | options: { |
@@ -196,7 +193,7 @@ export type VideoEditorTaskOutroPayload = { | |||
196 | } | 193 | } |
197 | } | 194 | } |
198 | 195 | ||
199 | export type VideoEditorTaskWatermarkPayload = { | 196 | export type VideoStudioTaskWatermarkPayload = { |
200 | name: 'add-watermark' | 197 | name: 'add-watermark' |
201 | 198 | ||
202 | options: { | 199 | options: { |
@@ -204,13 +201,13 @@ export type VideoEditorTaskWatermarkPayload = { | |||
204 | } | 201 | } |
205 | } | 202 | } |
206 | 203 | ||
207 | export type VideoEditionTaskPayload = | 204 | export type VideoStudioTaskPayload = |
208 | VideoEditorTaskCutPayload | | 205 | VideoStudioTaskCutPayload | |
209 | VideoEditorTaskIntroPayload | | 206 | VideoStudioTaskIntroPayload | |
210 | VideoEditorTaskOutroPayload | | 207 | VideoStudioTaskOutroPayload | |
211 | VideoEditorTaskWatermarkPayload | 208 | VideoStudioTaskWatermarkPayload |
212 | 209 | ||
213 | export interface VideoEditionPayload { | 210 | export interface VideoStudioEditionPayload { |
214 | videoUUID: string | 211 | videoUUID: string |
215 | tasks: VideoEditionTaskPayload[] | 212 | tasks: VideoStudioTaskPayload[] |
216 | } | 213 | } |
diff --git a/shared/models/server/server-config.model.ts b/shared/models/server/server-config.model.ts index 146bed24b..67ad809f7 100644 --- a/shared/models/server/server-config.model.ts +++ b/shared/models/server/server-config.model.ts | |||
@@ -175,7 +175,7 @@ export interface ServerConfig { | |||
175 | } | 175 | } |
176 | } | 176 | } |
177 | 177 | ||
178 | videoEditor: { | 178 | videoStudio: { |
179 | enabled: boolean | 179 | enabled: boolean |
180 | } | 180 | } |
181 | 181 | ||
diff --git a/shared/models/users/user-notification-setting.model.ts b/shared/models/users/user-notification-setting.model.ts index 35656f14c..278a05e7a 100644 --- a/shared/models/users/user-notification-setting.model.ts +++ b/shared/models/users/user-notification-setting.model.ts | |||
@@ -28,5 +28,5 @@ export interface UserNotificationSetting { | |||
28 | newPeerTubeVersion: UserNotificationSettingValue | 28 | newPeerTubeVersion: UserNotificationSettingValue |
29 | newPluginVersion: UserNotificationSettingValue | 29 | newPluginVersion: UserNotificationSettingValue |
30 | 30 | ||
31 | myVideoEditionFinished: UserNotificationSettingValue | 31 | myVideoStudioEditionFinished: UserNotificationSettingValue |
32 | } | 32 | } |
diff --git a/shared/models/users/user-notification.model.ts b/shared/models/users/user-notification.model.ts index a2918194f..0fd7a7181 100644 --- a/shared/models/users/user-notification.model.ts +++ b/shared/models/users/user-notification.model.ts | |||
@@ -32,7 +32,7 @@ export const enum UserNotificationType { | |||
32 | NEW_PLUGIN_VERSION = 17, | 32 | NEW_PLUGIN_VERSION = 17, |
33 | NEW_PEERTUBE_VERSION = 18, | 33 | NEW_PEERTUBE_VERSION = 18, |
34 | 34 | ||
35 | MY_VIDEO_EDITION_FINISHED = 19 | 35 | MY_VIDEO_STUDIO_EDITION_FINISHED = 19 |
36 | } | 36 | } |
37 | 37 | ||
38 | export interface VideoInfo { | 38 | export interface VideoInfo { |
diff --git a/shared/models/videos/editor/index.ts b/shared/models/videos/editor/index.ts deleted file mode 100644 index 3436f2c3f..000000000 --- a/shared/models/videos/editor/index.ts +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | export * from './video-editor-create-edit.model' | ||
diff --git a/shared/models/videos/editor/video-editor-create-edit.model.ts b/shared/models/videos/editor/video-editor-create-edit.model.ts deleted file mode 100644 index 36b7c8d55..000000000 --- a/shared/models/videos/editor/video-editor-create-edit.model.ts +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | export interface VideoEditorCreateEdition { | ||
2 | tasks: VideoEditorTask[] | ||
3 | } | ||
4 | |||
5 | export type VideoEditorTask = | ||
6 | VideoEditorTaskCut | | ||
7 | VideoEditorTaskIntro | | ||
8 | VideoEditorTaskOutro | | ||
9 | VideoEditorTaskWatermark | ||
10 | |||
11 | export interface VideoEditorTaskCut { | ||
12 | name: 'cut' | ||
13 | |||
14 | options: { | ||
15 | start?: number | ||
16 | end?: number | ||
17 | } | ||
18 | } | ||
19 | |||
20 | export interface VideoEditorTaskIntro { | ||
21 | name: 'add-intro' | ||
22 | |||
23 | options: { | ||
24 | file: Blob | string | ||
25 | } | ||
26 | } | ||
27 | |||
28 | export interface VideoEditorTaskOutro { | ||
29 | name: 'add-outro' | ||
30 | |||
31 | options: { | ||
32 | file: Blob | string | ||
33 | } | ||
34 | } | ||
35 | |||
36 | export interface VideoEditorTaskWatermark { | ||
37 | name: 'add-watermark' | ||
38 | |||
39 | options: { | ||
40 | file: Blob | string | ||
41 | } | ||
42 | } | ||
diff --git a/shared/models/videos/index.ts b/shared/models/videos/index.ts index e8eb227ab..705e8d0ff 100644 --- a/shared/models/videos/index.ts +++ b/shared/models/videos/index.ts | |||
@@ -3,7 +3,7 @@ export * from './caption' | |||
3 | export * from './change-ownership' | 3 | export * from './change-ownership' |
4 | export * from './channel' | 4 | export * from './channel' |
5 | export * from './comment' | 5 | export * from './comment' |
6 | export * from './editor' | 6 | export * from './studio' |
7 | export * from './live' | 7 | export * from './live' |
8 | export * from './file' | 8 | export * from './file' |
9 | export * from './import' | 9 | export * from './import' |
diff --git a/shared/models/videos/studio/index.ts b/shared/models/videos/studio/index.ts new file mode 100644 index 000000000..a1eb98a49 --- /dev/null +++ b/shared/models/videos/studio/index.ts | |||
@@ -0,0 +1 @@ | |||
export * from './video-studio-create-edit.model' | |||
diff --git a/shared/models/videos/studio/video-studio-create-edit.model.ts b/shared/models/videos/studio/video-studio-create-edit.model.ts new file mode 100644 index 000000000..001d65c90 --- /dev/null +++ b/shared/models/videos/studio/video-studio-create-edit.model.ts | |||
@@ -0,0 +1,42 @@ | |||
1 | export interface VideoStudioCreateEdition { | ||
2 | tasks: VideoStudioTask[] | ||
3 | } | ||
4 | |||
5 | export type VideoStudioTask = | ||
6 | VideoStudioTaskCut | | ||
7 | VideoStudioTaskIntro | | ||
8 | VideoStudioTaskOutro | | ||
9 | VideoStudioTaskWatermark | ||
10 | |||
11 | export interface VideoStudioTaskCut { | ||
12 | name: 'cut' | ||
13 | |||
14 | options: { | ||
15 | start?: number | ||
16 | end?: number | ||
17 | } | ||
18 | } | ||
19 | |||
20 | export interface VideoStudioTaskIntro { | ||
21 | name: 'add-intro' | ||
22 | |||
23 | options: { | ||
24 | file: Blob | string | ||
25 | } | ||
26 | } | ||
27 | |||
28 | export interface VideoStudioTaskOutro { | ||
29 | name: 'add-outro' | ||
30 | |||
31 | options: { | ||
32 | file: Blob | string | ||
33 | } | ||
34 | } | ||
35 | |||
36 | export interface VideoStudioTaskWatermark { | ||
37 | name: 'add-watermark' | ||
38 | |||
39 | options: { | ||
40 | file: Blob | string | ||
41 | } | ||
42 | } | ||
diff --git a/shared/server-commands/server/config-command.ts b/shared/server-commands/server/config-command.ts index 35a1eec7c..ed4961bc3 100644 --- a/shared/server-commands/server/config-command.ts +++ b/shared/server-commands/server/config-command.ts | |||
@@ -60,7 +60,7 @@ export class ConfigCommand extends AbstractCommand { | |||
60 | transcoding: { | 60 | transcoding: { |
61 | enabled: false | 61 | enabled: false |
62 | }, | 62 | }, |
63 | videoEditor: { | 63 | videoStudio: { |
64 | enabled: false | 64 | enabled: false |
65 | } | 65 | } |
66 | } | 66 | } |
@@ -111,10 +111,10 @@ export class ConfigCommand extends AbstractCommand { | |||
111 | }) | 111 | }) |
112 | } | 112 | } |
113 | 113 | ||
114 | enableEditor () { | 114 | enableStudio () { |
115 | return this.updateExistingSubConfig({ | 115 | return this.updateExistingSubConfig({ |
116 | newConfig: { | 116 | newConfig: { |
117 | videoEditor: { | 117 | videoStudio: { |
118 | enabled: true | 118 | enabled: true |
119 | } | 119 | } |
120 | } | 120 | } |
@@ -339,7 +339,7 @@ export class ConfigCommand extends AbstractCommand { | |||
339 | } | 339 | } |
340 | } | 340 | } |
341 | }, | 341 | }, |
342 | videoEditor: { | 342 | videoStudio: { |
343 | enabled: false | 343 | enabled: false |
344 | }, | 344 | }, |
345 | import: { | 345 | import: { |
diff --git a/shared/server-commands/server/server.ts b/shared/server-commands/server/server.ts index af4423e8d..2bf31b5a4 100644 --- a/shared/server-commands/server/server.ts +++ b/shared/server-commands/server/server.ts | |||
@@ -25,7 +25,7 @@ import { | |||
25 | PlaylistsCommand, | 25 | PlaylistsCommand, |
26 | ServicesCommand, | 26 | ServicesCommand, |
27 | StreamingPlaylistsCommand, | 27 | StreamingPlaylistsCommand, |
28 | VideoEditorCommand, | 28 | VideoStudioCommand, |
29 | VideosCommand | 29 | VideosCommand |
30 | } from '../videos' | 30 | } from '../videos' |
31 | import { CommentsCommand } from '../videos/comments-command' | 31 | import { CommentsCommand } from '../videos/comments-command' |
@@ -125,7 +125,7 @@ export class PeerTubeServer { | |||
125 | login?: LoginCommand | 125 | login?: LoginCommand |
126 | users?: UsersCommand | 126 | users?: UsersCommand |
127 | objectStorage?: ObjectStorageCommand | 127 | objectStorage?: ObjectStorageCommand |
128 | videoEditor?: VideoEditorCommand | 128 | videoStudio?: VideoStudioCommand |
129 | videos?: VideosCommand | 129 | videos?: VideosCommand |
130 | 130 | ||
131 | constructor (options: { serverNumber: number } | { url: string }) { | 131 | constructor (options: { serverNumber: number } | { url: string }) { |
@@ -396,6 +396,6 @@ export class PeerTubeServer { | |||
396 | this.users = new UsersCommand(this) | 396 | this.users = new UsersCommand(this) |
397 | this.videos = new VideosCommand(this) | 397 | this.videos = new VideosCommand(this) |
398 | this.objectStorage = new ObjectStorageCommand(this) | 398 | this.objectStorage = new ObjectStorageCommand(this) |
399 | this.videoEditor = new VideoEditorCommand(this) | 399 | this.videoStudio = new VideoStudioCommand(this) |
400 | } | 400 | } |
401 | } | 401 | } |
diff --git a/shared/server-commands/videos/index.ts b/shared/server-commands/videos/index.ts index 154aed9a6..c9ef6134d 100644 --- a/shared/server-commands/videos/index.ts +++ b/shared/server-commands/videos/index.ts | |||
@@ -12,5 +12,5 @@ export * from './playlists-command' | |||
12 | export * from './services-command' | 12 | export * from './services-command' |
13 | export * from './streaming-playlists-command' | 13 | export * from './streaming-playlists-command' |
14 | export * from './comments-command' | 14 | export * from './comments-command' |
15 | export * from './video-editor-command' | 15 | export * from './video-studio-command' |
16 | export * from './videos-command' | 16 | export * from './videos-command' |
diff --git a/shared/server-commands/videos/video-editor-command.ts b/shared/server-commands/videos/video-studio-command.ts index 485edce8e..9fe467cc2 100644 --- a/shared/server-commands/videos/video-editor-command.ts +++ b/shared/server-commands/videos/video-studio-command.ts | |||
@@ -1,9 +1,9 @@ | |||
1 | import { HttpStatusCode, VideoEditorTask } from '@shared/models' | 1 | import { HttpStatusCode, VideoStudioTask } from '@shared/models' |
2 | import { AbstractCommand, OverrideCommandOptions } from '../shared' | 2 | import { AbstractCommand, OverrideCommandOptions } from '../shared' |
3 | 3 | ||
4 | export class VideoEditorCommand extends AbstractCommand { | 4 | export class VideoStudioCommand extends AbstractCommand { |
5 | 5 | ||
6 | static getComplexTask (): VideoEditorTask[] { | 6 | static getComplexTask (): VideoStudioTask[] { |
7 | return [ | 7 | return [ |
8 | // Total duration: 2 | 8 | // Total duration: 2 |
9 | { | 9 | { |
@@ -41,9 +41,9 @@ export class VideoEditorCommand extends AbstractCommand { | |||
41 | 41 | ||
42 | createEditionTasks (options: OverrideCommandOptions & { | 42 | createEditionTasks (options: OverrideCommandOptions & { |
43 | videoId: number | string | 43 | videoId: number | string |
44 | tasks: VideoEditorTask[] | 44 | tasks: VideoStudioTask[] |
45 | }) { | 45 | }) { |
46 | const path = '/api/v1/videos/' + options.videoId + '/editor/edit' | 46 | const path = '/api/v1/videos/' + options.videoId + '/studio/edit' |
47 | const attaches: { [id: string]: any } = {} | 47 | const attaches: { [id: string]: any } = {} |
48 | 48 | ||
49 | for (let i = 0; i < options.tasks.length; i++) { | 49 | for (let i = 0; i < options.tasks.length; i++) { |