diff options
Diffstat (limited to 'shared')
-rw-r--r-- | shared/core-utils/i18n/i18n.ts | 1 | ||||
-rw-r--r-- | shared/models/plugins/client/client-hook.model.ts | 10 | ||||
-rw-r--r-- | shared/models/videos/channel/video-channel.model.ts | 1 | ||||
-rw-r--r-- | shared/models/videos/video-sort-field.type.ts | 1 | ||||
-rw-r--r-- | shared/models/videos/video-source.ts | 3 | ||||
-rw-r--r-- | shared/server-commands/videos/videos-command.ts | 15 |
6 files changed, 26 insertions, 5 deletions
diff --git a/shared/core-utils/i18n/i18n.ts b/shared/core-utils/i18n/i18n.ts index f0fcb5af7..07f0bdeb7 100644 --- a/shared/core-utils/i18n/i18n.ts +++ b/shared/core-utils/i18n/i18n.ts | |||
@@ -33,6 +33,7 @@ export const I18N_LOCALES = { | |||
33 | 'nb-NO': 'norsk bokmål', | 33 | 'nb-NO': 'norsk bokmål', |
34 | 'th-TH': 'ไทย', | 34 | 'th-TH': 'ไทย', |
35 | 'vi-VN': 'Tiếng Việt', | 35 | 'vi-VN': 'Tiếng Việt', |
36 | 'tok': 'Toki Pona', | ||
36 | 'zh-Hans-CN': '简体中文(中国)', | 37 | 'zh-Hans-CN': '简体中文(中国)', |
37 | 'zh-Hant-TW': '繁體中文(台灣)' | 38 | 'zh-Hant-TW': '繁體中文(台灣)' |
38 | } | 39 | } |
diff --git a/shared/models/plugins/client/client-hook.model.ts b/shared/models/plugins/client/client-hook.model.ts index bb55e92d5..04d42d591 100644 --- a/shared/models/plugins/client/client-hook.model.ts +++ b/shared/models/plugins/client/client-hook.model.ts | |||
@@ -108,16 +108,16 @@ export const clientActionHookObject = { | |||
108 | // Fired when the admin plugin settings page is being initialized | 108 | // Fired when the admin plugin settings page is being initialized |
109 | 'action:admin-plugin-settings.init': true, | 109 | 'action:admin-plugin-settings.init': true, |
110 | 110 | ||
111 | // Fired when the video upload page is being initalized | 111 | // Fired when the video upload page is being initialized |
112 | 'action:video-upload.init': true, | 112 | 'action:video-upload.init': true, |
113 | // Fired when the video import by URL page is being initalized | 113 | // Fired when the video import by URL page is being initialized |
114 | 'action:video-url-import.init': true, | 114 | 'action:video-url-import.init': true, |
115 | // Fired when the video import by torrent/magnet URI page is being initalized | 115 | // Fired when the video import by torrent/magnet URI page is being initialized |
116 | 'action:video-torrent-import.init': true, | 116 | 'action:video-torrent-import.init': true, |
117 | // Fired when the "Go Live" page is being initalized | 117 | // Fired when the "Go Live" page is being initialized |
118 | 'action:go-live.init': true, | 118 | 'action:go-live.init': true, |
119 | 119 | ||
120 | // Fired when the user explicitely logged in/logged out | 120 | // Fired when the user explicitly logged in/logged out |
121 | 'action:auth-user.logged-in': true, | 121 | 'action:auth-user.logged-in': true, |
122 | 'action:auth-user.logged-out': true, | 122 | 'action:auth-user.logged-out': true, |
123 | // Fired when the application loaded user information (using tokens from the local storage or after a successful login) | 123 | // Fired when the application loaded user information (using tokens from the local storage or after a successful login) |
diff --git a/shared/models/videos/channel/video-channel.model.ts b/shared/models/videos/channel/video-channel.model.ts index 58b60c177..68e2f9c4c 100644 --- a/shared/models/videos/channel/video-channel.model.ts +++ b/shared/models/videos/channel/video-channel.model.ts | |||
@@ -18,6 +18,7 @@ export interface VideoChannel extends Actor { | |||
18 | 18 | ||
19 | videosCount?: number | 19 | videosCount?: number |
20 | viewsPerDay?: ViewsPerDate[] // chronologically ordered | 20 | viewsPerDay?: ViewsPerDate[] // chronologically ordered |
21 | totalViews?: number | ||
21 | 22 | ||
22 | banners: ActorImage[] | 23 | banners: ActorImage[] |
23 | 24 | ||
diff --git a/shared/models/videos/video-sort-field.type.ts b/shared/models/videos/video-sort-field.type.ts index 5073848b8..7fa07fa73 100644 --- a/shared/models/videos/video-sort-field.type.ts +++ b/shared/models/videos/video-sort-field.type.ts | |||
@@ -2,6 +2,7 @@ export type VideoSortField = | |||
2 | 'name' | '-name' | | 2 | 'name' | '-name' | |
3 | 'duration' | '-duration' | | 3 | 'duration' | '-duration' | |
4 | 'publishedAt' | '-publishedAt' | | 4 | 'publishedAt' | '-publishedAt' | |
5 | 'originallyPublishedAt' | '-originallyPublishedAt' | | ||
5 | 'createdAt' | '-createdAt' | | 6 | 'createdAt' | '-createdAt' | |
6 | 'views' | '-views' | | 7 | 'views' | '-views' | |
7 | 'likes' | '-likes' | | 8 | 'likes' | '-likes' | |
diff --git a/shared/models/videos/video-source.ts b/shared/models/videos/video-source.ts new file mode 100644 index 000000000..57e54fc7f --- /dev/null +++ b/shared/models/videos/video-source.ts | |||
@@ -0,0 +1,3 @@ | |||
1 | export interface VideoSource { | ||
2 | filename: string | ||
3 | } | ||
diff --git a/shared/server-commands/videos/videos-command.ts b/shared/server-commands/videos/videos-command.ts index 1cceb58db..e952c9777 100644 --- a/shared/server-commands/videos/videos-command.ts +++ b/shared/server-commands/videos/videos-command.ts | |||
@@ -23,6 +23,7 @@ import { | |||
23 | import { unwrapBody } from '../requests' | 23 | import { unwrapBody } from '../requests' |
24 | import { waitJobs } from '../server' | 24 | import { waitJobs } from '../server' |
25 | import { AbstractCommand, OverrideCommandOptions } from '../shared' | 25 | import { AbstractCommand, OverrideCommandOptions } from '../shared' |
26 | import { VideoSource } from '@shared/models/videos/video-source' | ||
26 | 27 | ||
27 | export type VideoEdit = Partial<Omit<VideoCreate, 'thumbnailfile' | 'previewfile'>> & { | 28 | export type VideoEdit = Partial<Omit<VideoCreate, 'thumbnailfile' | 'previewfile'>> & { |
28 | fixture?: string | 29 | fixture?: string |
@@ -150,6 +151,20 @@ export class VideosCommand extends AbstractCommand { | |||
150 | }) | 151 | }) |
151 | } | 152 | } |
152 | 153 | ||
154 | getSource (options: OverrideCommandOptions & { | ||
155 | id: number | string | ||
156 | }) { | ||
157 | const path = '/api/v1/videos/' + options.id + '/source' | ||
158 | |||
159 | return this.getRequestBody<VideoSource>({ | ||
160 | ...options, | ||
161 | |||
162 | path, | ||
163 | implicitToken: true, | ||
164 | defaultExpectedStatus: HttpStatusCode.OK_200 | ||
165 | }) | ||
166 | } | ||
167 | |||
153 | async getId (options: OverrideCommandOptions & { | 168 | async getId (options: OverrideCommandOptions & { |
154 | uuid: number | string | 169 | uuid: number | string |
155 | }) { | 170 | }) { |