From bd45d503e5d007e730f4e81dccd7e7864c9a85cc Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 6 Aug 2020 14:58:01 +0200 Subject: Reorganize shared models --- .../core-utils/abuse/abuse-predefined-reasons.ts | 14 +++ shared/core-utils/abuse/index.ts | 1 + shared/core-utils/i18n/i18n.ts | 105 +++++++++++++++++++++ shared/core-utils/i18n/index.ts | 1 + shared/core-utils/users/index.ts | 1 + shared/core-utils/users/user-role.ts | 35 +++++++ shared/models/feeds/feed-format.enum.ts | 2 +- shared/models/i18n/i18n.ts | 105 --------------------- shared/models/i18n/index.ts | 1 - shared/models/index.ts | 1 - .../models/moderation/abuse/abuse-reason.model.ts | 15 +-- .../models/moderation/abuse/abuse-state.model.ts | 2 +- shared/models/plugins/hook-type.enum.ts | 2 +- shared/models/users/user-flag.model.ts | 2 +- .../users/user-notification-setting.model.ts | 2 +- shared/models/users/user-right.enum.ts | 2 +- shared/models/users/user-role.ts | 36 ------- .../videos/blacklist/video-blacklist.model.ts | 2 +- .../videos/import/video-import-state.enum.ts | 2 +- .../playlist/video-playlist-element.model.ts | 2 +- .../playlist/video-playlist-privacy.model.ts | 2 +- .../videos/playlist/video-playlist-type.model.ts | 2 +- shared/models/videos/thumbnail.type.ts | 2 +- .../models/videos/video-change-ownership.model.ts | 2 +- shared/models/videos/video-privacy.enum.ts | 2 +- shared/models/videos/video-resolution.enum.ts | 2 +- shared/models/videos/video-state.enum.ts | 2 +- .../models/videos/video-streaming-playlist.type.ts | 2 +- 28 files changed, 175 insertions(+), 174 deletions(-) create mode 100644 shared/core-utils/abuse/abuse-predefined-reasons.ts create mode 100644 shared/core-utils/abuse/index.ts create mode 100644 shared/core-utils/i18n/i18n.ts create mode 100644 shared/core-utils/i18n/index.ts create mode 100644 shared/core-utils/users/index.ts create mode 100644 shared/core-utils/users/user-role.ts delete mode 100644 shared/models/i18n/i18n.ts delete mode 100644 shared/models/i18n/index.ts (limited to 'shared') diff --git a/shared/core-utils/abuse/abuse-predefined-reasons.ts b/shared/core-utils/abuse/abuse-predefined-reasons.ts new file mode 100644 index 000000000..9967e54dd --- /dev/null +++ b/shared/core-utils/abuse/abuse-predefined-reasons.ts @@ -0,0 +1,14 @@ +import { AbusePredefinedReasons, AbusePredefinedReasonsString } from '../../models/moderation/abuse/abuse-reason.model' + +export const abusePredefinedReasonsMap: { + [key in AbusePredefinedReasonsString]: AbusePredefinedReasons +} = { + violentOrRepulsive: AbusePredefinedReasons.VIOLENT_OR_REPULSIVE, + hatefulOrAbusive: AbusePredefinedReasons.HATEFUL_OR_ABUSIVE, + spamOrMisleading: AbusePredefinedReasons.SPAM_OR_MISLEADING, + privacy: AbusePredefinedReasons.PRIVACY, + rights: AbusePredefinedReasons.RIGHTS, + serverRules: AbusePredefinedReasons.SERVER_RULES, + thumbnails: AbusePredefinedReasons.THUMBNAILS, + captions: AbusePredefinedReasons.CAPTIONS +} diff --git a/shared/core-utils/abuse/index.ts b/shared/core-utils/abuse/index.ts new file mode 100644 index 000000000..244b83cff --- /dev/null +++ b/shared/core-utils/abuse/index.ts @@ -0,0 +1 @@ +export * from './abuse-predefined-reasons' diff --git a/shared/core-utils/i18n/i18n.ts b/shared/core-utils/i18n/i18n.ts new file mode 100644 index 000000000..9ad0f456d --- /dev/null +++ b/shared/core-utils/i18n/i18n.ts @@ -0,0 +1,105 @@ +export const LOCALE_FILES = [ 'player', 'server' ] + +export const I18N_LOCALES = { + // Always first to avoid issues when using express acceptLanguages function when no accept language header is set + 'en-US': 'English', + + 'ar': 'العربية', + 'ca-ES': 'Català', + 'cs-CZ': 'Čeština', + 'de-DE': 'Deutsch', + 'el-GR': 'ελληνικά', + 'eo': 'Esperanto', + 'es-ES': 'Español', + 'eu-ES': 'Euskara', + 'fi-FI': 'suomi', + 'fr-FR': 'Français', + 'gd': 'Gàidhlig', + 'hu-HU': 'magyar', + 'it-IT': 'Italiano', + 'ja-JP': '日本語', + 'kab': 'Taqbaylit', + 'nl-NL': 'Nederlands', + 'oc': 'Occitan', + 'pl-PL': 'Polski', + 'pt-BR': 'Português (Brasil)', + 'pt-PT': 'Português (Portugal)', + 'ru-RU': 'русский', + 'sv-SE': 'svenska', + 'th-TH': 'ไทย', + 'vi-VN': 'Tiếng Việt', + 'zh-Hans-CN': '简体中文(中国)', + 'zh-Hant-TW': '繁體中文(台灣)' +} + +const I18N_LOCALE_ALIAS = { + 'ar-001': 'ar', + 'ca': 'ca-ES', + 'cs': 'cs-CZ', + 'de': 'de-DE', + 'el': 'el-GR', + 'en': 'en-US', + 'es': 'es-ES', + 'eu': 'eu-ES', + 'fi': 'fi-FI', + 'fr': 'fr-FR', + 'hu': 'hu-HU', + 'it': 'it-IT', + 'ja': 'ja-JP', + 'nl': 'nl-NL', + 'pl': 'pl-PL', + 'pt': 'pt-BR', + 'ru': 'ru-RU', + 'sv': 'sv-SE', + 'th': 'th-TH', + 'vi': 'vi-VN', + 'zh-CN': 'zh-Hans-CN', + 'zh-Hans': 'zh-Hans-CN', + 'zh-Hant': 'zh-Hant-TW', + 'zh-TW': 'zh-Hant-TW', + 'zh': 'zh-Hans-CN' +} + +export const POSSIBLE_LOCALES = Object.keys(I18N_LOCALES) + .concat(Object.keys(I18N_LOCALE_ALIAS)) + +export function getDefaultLocale () { + return 'en-US' +} + +export function isDefaultLocale (locale: string) { + return getCompleteLocale(locale) === getCompleteLocale(getDefaultLocale()) +} + +export function peertubeTranslate (str: string, translations?: { [ id: string ]: string }) { + // FIXME: remove disable rule when the client is upgraded to typescript 3.7 + // eslint-disable-next-line + return translations && translations[str] ? translations[str] : str +} + +const possiblePaths = POSSIBLE_LOCALES.map(l => '/' + l) +export function is18nPath (path: string) { + return possiblePaths.includes(path) +} + +export function is18nLocale (locale: string) { + return POSSIBLE_LOCALES.includes(locale) +} + +export function getCompleteLocale (locale: string) { + if (!locale) return locale + + if (I18N_LOCALE_ALIAS[locale]) return I18N_LOCALE_ALIAS[locale] + + return locale +} + +export function getShortLocale (locale: string) { + if (locale.includes('-') === false) return locale + + return locale.split('-')[0] +} + +export function buildFileLocale (locale: string) { + return getCompleteLocale(locale) +} diff --git a/shared/core-utils/i18n/index.ts b/shared/core-utils/i18n/index.ts new file mode 100644 index 000000000..8f7cbe2c7 --- /dev/null +++ b/shared/core-utils/i18n/index.ts @@ -0,0 +1 @@ +export * from './i18n' diff --git a/shared/core-utils/users/index.ts b/shared/core-utils/users/index.ts new file mode 100644 index 000000000..1cbf0af1b --- /dev/null +++ b/shared/core-utils/users/index.ts @@ -0,0 +1 @@ +export * from './user-role' diff --git a/shared/core-utils/users/user-role.ts b/shared/core-utils/users/user-role.ts new file mode 100644 index 000000000..2b322faf3 --- /dev/null +++ b/shared/core-utils/users/user-role.ts @@ -0,0 +1,35 @@ +import { UserRight, UserRole } from '../../models/users' + +export const USER_ROLE_LABELS: { [ id in UserRole ]: string } = { + [UserRole.USER]: 'User', + [UserRole.MODERATOR]: 'Moderator', + [UserRole.ADMINISTRATOR]: 'Administrator' +} + +const userRoleRights: { [ id in UserRole ]: UserRight[] } = { + [UserRole.ADMINISTRATOR]: [ + UserRight.ALL + ], + + [UserRole.MODERATOR]: [ + UserRight.MANAGE_VIDEO_BLACKLIST, + UserRight.MANAGE_ABUSES, + UserRight.REMOVE_ANY_VIDEO, + UserRight.REMOVE_ANY_VIDEO_CHANNEL, + UserRight.REMOVE_ANY_VIDEO_PLAYLIST, + UserRight.REMOVE_ANY_VIDEO_COMMENT, + UserRight.UPDATE_ANY_VIDEO, + UserRight.SEE_ALL_VIDEOS, + UserRight.MANAGE_ACCOUNTS_BLOCKLIST, + UserRight.MANAGE_SERVERS_BLOCKLIST, + UserRight.MANAGE_USERS + ], + + [UserRole.USER]: [] +} + +export function hasUserRight (userRole: UserRole, userRight: UserRight) { + const userRights = userRoleRights[userRole] + + return userRights.includes(UserRight.ALL) || userRights.includes(userRight) +} diff --git a/shared/models/feeds/feed-format.enum.ts b/shared/models/feeds/feed-format.enum.ts index f3173a781..d3d574331 100644 --- a/shared/models/feeds/feed-format.enum.ts +++ b/shared/models/feeds/feed-format.enum.ts @@ -1,4 +1,4 @@ -export enum FeedFormat { +export const enum FeedFormat { RSS = 'xml', ATOM = 'atom', JSON = 'json' diff --git a/shared/models/i18n/i18n.ts b/shared/models/i18n/i18n.ts deleted file mode 100644 index 9ad0f456d..000000000 --- a/shared/models/i18n/i18n.ts +++ /dev/null @@ -1,105 +0,0 @@ -export const LOCALE_FILES = [ 'player', 'server' ] - -export const I18N_LOCALES = { - // Always first to avoid issues when using express acceptLanguages function when no accept language header is set - 'en-US': 'English', - - 'ar': 'العربية', - 'ca-ES': 'Català', - 'cs-CZ': 'Čeština', - 'de-DE': 'Deutsch', - 'el-GR': 'ελληνικά', - 'eo': 'Esperanto', - 'es-ES': 'Español', - 'eu-ES': 'Euskara', - 'fi-FI': 'suomi', - 'fr-FR': 'Français', - 'gd': 'Gàidhlig', - 'hu-HU': 'magyar', - 'it-IT': 'Italiano', - 'ja-JP': '日本語', - 'kab': 'Taqbaylit', - 'nl-NL': 'Nederlands', - 'oc': 'Occitan', - 'pl-PL': 'Polski', - 'pt-BR': 'Português (Brasil)', - 'pt-PT': 'Português (Portugal)', - 'ru-RU': 'русский', - 'sv-SE': 'svenska', - 'th-TH': 'ไทย', - 'vi-VN': 'Tiếng Việt', - 'zh-Hans-CN': '简体中文(中国)', - 'zh-Hant-TW': '繁體中文(台灣)' -} - -const I18N_LOCALE_ALIAS = { - 'ar-001': 'ar', - 'ca': 'ca-ES', - 'cs': 'cs-CZ', - 'de': 'de-DE', - 'el': 'el-GR', - 'en': 'en-US', - 'es': 'es-ES', - 'eu': 'eu-ES', - 'fi': 'fi-FI', - 'fr': 'fr-FR', - 'hu': 'hu-HU', - 'it': 'it-IT', - 'ja': 'ja-JP', - 'nl': 'nl-NL', - 'pl': 'pl-PL', - 'pt': 'pt-BR', - 'ru': 'ru-RU', - 'sv': 'sv-SE', - 'th': 'th-TH', - 'vi': 'vi-VN', - 'zh-CN': 'zh-Hans-CN', - 'zh-Hans': 'zh-Hans-CN', - 'zh-Hant': 'zh-Hant-TW', - 'zh-TW': 'zh-Hant-TW', - 'zh': 'zh-Hans-CN' -} - -export const POSSIBLE_LOCALES = Object.keys(I18N_LOCALES) - .concat(Object.keys(I18N_LOCALE_ALIAS)) - -export function getDefaultLocale () { - return 'en-US' -} - -export function isDefaultLocale (locale: string) { - return getCompleteLocale(locale) === getCompleteLocale(getDefaultLocale()) -} - -export function peertubeTranslate (str: string, translations?: { [ id: string ]: string }) { - // FIXME: remove disable rule when the client is upgraded to typescript 3.7 - // eslint-disable-next-line - return translations && translations[str] ? translations[str] : str -} - -const possiblePaths = POSSIBLE_LOCALES.map(l => '/' + l) -export function is18nPath (path: string) { - return possiblePaths.includes(path) -} - -export function is18nLocale (locale: string) { - return POSSIBLE_LOCALES.includes(locale) -} - -export function getCompleteLocale (locale: string) { - if (!locale) return locale - - if (I18N_LOCALE_ALIAS[locale]) return I18N_LOCALE_ALIAS[locale] - - return locale -} - -export function getShortLocale (locale: string) { - if (locale.includes('-') === false) return locale - - return locale.split('-')[0] -} - -export function buildFileLocale (locale: string) { - return getCompleteLocale(locale) -} diff --git a/shared/models/i18n/index.ts b/shared/models/i18n/index.ts deleted file mode 100644 index 8f7cbe2c7..000000000 --- a/shared/models/i18n/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './i18n' diff --git a/shared/models/index.ts b/shared/models/index.ts index a68f57148..2214f7ca3 100644 --- a/shared/models/index.ts +++ b/shared/models/index.ts @@ -7,7 +7,6 @@ export * from './redundancy' export * from './users' export * from './videos' export * from './feeds' -export * from './i18n' export * from './overviews' export * from './plugins' export * from './search' diff --git a/shared/models/moderation/abuse/abuse-reason.model.ts b/shared/models/moderation/abuse/abuse-reason.model.ts index 36875969d..57359aef6 100644 --- a/shared/models/moderation/abuse/abuse-reason.model.ts +++ b/shared/models/moderation/abuse/abuse-reason.model.ts @@ -1,4 +1,4 @@ -export enum AbusePredefinedReasons { +export const enum AbusePredefinedReasons { VIOLENT_OR_REPULSIVE = 1, HATEFUL_OR_ABUSIVE, SPAM_OR_MISLEADING, @@ -18,16 +18,3 @@ export type AbusePredefinedReasonsString = 'serverRules' | 'thumbnails' | 'captions' - -export const abusePredefinedReasonsMap: { - [key in AbusePredefinedReasonsString]: AbusePredefinedReasons -} = { - violentOrRepulsive: AbusePredefinedReasons.VIOLENT_OR_REPULSIVE, - hatefulOrAbusive: AbusePredefinedReasons.HATEFUL_OR_ABUSIVE, - spamOrMisleading: AbusePredefinedReasons.SPAM_OR_MISLEADING, - privacy: AbusePredefinedReasons.PRIVACY, - rights: AbusePredefinedReasons.RIGHTS, - serverRules: AbusePredefinedReasons.SERVER_RULES, - thumbnails: AbusePredefinedReasons.THUMBNAILS, - captions: AbusePredefinedReasons.CAPTIONS -} diff --git a/shared/models/moderation/abuse/abuse-state.model.ts b/shared/models/moderation/abuse/abuse-state.model.ts index b00cccad8..8ef6fdada 100644 --- a/shared/models/moderation/abuse/abuse-state.model.ts +++ b/shared/models/moderation/abuse/abuse-state.model.ts @@ -1,4 +1,4 @@ -export enum AbuseState { +export const enum AbuseState { PENDING = 1, REJECTED = 2, ACCEPTED = 3 diff --git a/shared/models/plugins/hook-type.enum.ts b/shared/models/plugins/hook-type.enum.ts index 66d24071c..a96c943f1 100644 --- a/shared/models/plugins/hook-type.enum.ts +++ b/shared/models/plugins/hook-type.enum.ts @@ -1,4 +1,4 @@ -export enum HookType { +export const enum HookType { STATIC = 1, ACTION = 2, FILTER = 3 diff --git a/shared/models/users/user-flag.model.ts b/shared/models/users/user-flag.model.ts index b94262d5e..b791a1263 100644 --- a/shared/models/users/user-flag.model.ts +++ b/shared/models/users/user-flag.model.ts @@ -1,4 +1,4 @@ -export enum UserAdminFlag { +export const enum UserAdminFlag { NONE = 0, BYPASS_VIDEO_AUTO_BLACKLIST = 1 << 0 } diff --git a/shared/models/users/user-notification-setting.model.ts b/shared/models/users/user-notification-setting.model.ts index c7590fa8a..473148062 100644 --- a/shared/models/users/user-notification-setting.model.ts +++ b/shared/models/users/user-notification-setting.model.ts @@ -1,4 +1,4 @@ -export enum UserNotificationSettingValue { +export const enum UserNotificationSettingValue { NONE = 0, WEB = 1 << 0, EMAIL = 1 << 1 diff --git a/shared/models/users/user-right.enum.ts b/shared/models/users/user-right.enum.ts index 4a7ae4373..4c3d9e7c8 100644 --- a/shared/models/users/user-right.enum.ts +++ b/shared/models/users/user-right.enum.ts @@ -1,4 +1,4 @@ -export enum UserRight { +export const enum UserRight { ALL, MANAGE_USERS, diff --git a/shared/models/users/user-role.ts b/shared/models/users/user-role.ts index 772988c0c..94413abca 100644 --- a/shared/models/users/user-role.ts +++ b/shared/models/users/user-role.ts @@ -1,42 +1,6 @@ -import { UserRight } from './user-right.enum' - // Keep the order export enum UserRole { ADMINISTRATOR = 0, MODERATOR = 1, USER = 2 } - -export const USER_ROLE_LABELS: { [ id in UserRole ]: string } = { - [UserRole.USER]: 'User', - [UserRole.MODERATOR]: 'Moderator', - [UserRole.ADMINISTRATOR]: 'Administrator' -} - -const userRoleRights: { [ id in UserRole ]: UserRight[] } = { - [UserRole.ADMINISTRATOR]: [ - UserRight.ALL - ], - - [UserRole.MODERATOR]: [ - UserRight.MANAGE_VIDEO_BLACKLIST, - UserRight.MANAGE_ABUSES, - UserRight.REMOVE_ANY_VIDEO, - UserRight.REMOVE_ANY_VIDEO_CHANNEL, - UserRight.REMOVE_ANY_VIDEO_PLAYLIST, - UserRight.REMOVE_ANY_VIDEO_COMMENT, - UserRight.UPDATE_ANY_VIDEO, - UserRight.SEE_ALL_VIDEOS, - UserRight.MANAGE_ACCOUNTS_BLOCKLIST, - UserRight.MANAGE_SERVERS_BLOCKLIST, - UserRight.MANAGE_USERS - ], - - [UserRole.USER]: [] -} - -export function hasUserRight (userRole: UserRole, userRight: UserRight) { - const userRights = userRoleRights[userRole] - - return userRights.includes(UserRight.ALL) || userRights.includes(userRight) -} diff --git a/shared/models/videos/blacklist/video-blacklist.model.ts b/shared/models/videos/blacklist/video-blacklist.model.ts index a6e0ef175..982a34592 100644 --- a/shared/models/videos/blacklist/video-blacklist.model.ts +++ b/shared/models/videos/blacklist/video-blacklist.model.ts @@ -1,6 +1,6 @@ import { Video } from '../video.model' -export enum VideoBlacklistType { +export const enum VideoBlacklistType { MANUAL = 1, AUTO_BEFORE_PUBLISHED = 2 } diff --git a/shared/models/videos/import/video-import-state.enum.ts b/shared/models/videos/import/video-import-state.enum.ts index 8421b8ca7..33dd83f88 100644 --- a/shared/models/videos/import/video-import-state.enum.ts +++ b/shared/models/videos/import/video-import-state.enum.ts @@ -1,4 +1,4 @@ -export enum VideoImportState { +export const enum VideoImportState { PENDING = 1, SUCCESS = 2, FAILED = 3, diff --git a/shared/models/videos/playlist/video-playlist-element.model.ts b/shared/models/videos/playlist/video-playlist-element.model.ts index 9a1203892..df9e3b5cf 100644 --- a/shared/models/videos/playlist/video-playlist-element.model.ts +++ b/shared/models/videos/playlist/video-playlist-element.model.ts @@ -1,6 +1,6 @@ import { Video } from '../video.model' -export enum VideoPlaylistElementType { +export const enum VideoPlaylistElementType { REGULAR = 0, DELETED = 1, PRIVATE = 2, diff --git a/shared/models/videos/playlist/video-playlist-privacy.model.ts b/shared/models/videos/playlist/video-playlist-privacy.model.ts index 96e5e2211..480e1f104 100644 --- a/shared/models/videos/playlist/video-playlist-privacy.model.ts +++ b/shared/models/videos/playlist/video-playlist-privacy.model.ts @@ -1,4 +1,4 @@ -export enum VideoPlaylistPrivacy { +export const enum VideoPlaylistPrivacy { PUBLIC = 1, UNLISTED = 2, PRIVATE = 3 diff --git a/shared/models/videos/playlist/video-playlist-type.model.ts b/shared/models/videos/playlist/video-playlist-type.model.ts index 49233b743..7f51a6354 100644 --- a/shared/models/videos/playlist/video-playlist-type.model.ts +++ b/shared/models/videos/playlist/video-playlist-type.model.ts @@ -1,4 +1,4 @@ -export enum VideoPlaylistType { +export const enum VideoPlaylistType { REGULAR = 1, WATCH_LATER = 2 } diff --git a/shared/models/videos/thumbnail.type.ts b/shared/models/videos/thumbnail.type.ts index d6c2bef7b..6907b2802 100644 --- a/shared/models/videos/thumbnail.type.ts +++ b/shared/models/videos/thumbnail.type.ts @@ -1,4 +1,4 @@ -export enum ThumbnailType { +export const enum ThumbnailType { MINIATURE = 1, PREVIEW = 2 } diff --git a/shared/models/videos/video-change-ownership.model.ts b/shared/models/videos/video-change-ownership.model.ts index a9b1a17f3..669c7f3e7 100644 --- a/shared/models/videos/video-change-ownership.model.ts +++ b/shared/models/videos/video-change-ownership.model.ts @@ -10,7 +10,7 @@ export interface VideoChangeOwnership { createdAt: Date } -export enum VideoChangeOwnershipStatus { +export const enum VideoChangeOwnershipStatus { WAITING = 'WAITING', ACCEPTED = 'ACCEPTED', REFUSED = 'REFUSED' diff --git a/shared/models/videos/video-privacy.enum.ts b/shared/models/videos/video-privacy.enum.ts index 17ed0c9bb..39fd0529f 100644 --- a/shared/models/videos/video-privacy.enum.ts +++ b/shared/models/videos/video-privacy.enum.ts @@ -1,4 +1,4 @@ -export enum VideoPrivacy { +export const enum VideoPrivacy { PUBLIC = 1, UNLISTED = 2, PRIVATE = 3, diff --git a/shared/models/videos/video-resolution.enum.ts b/shared/models/videos/video-resolution.enum.ts index 8b5a96cb6..571ab5d8f 100644 --- a/shared/models/videos/video-resolution.enum.ts +++ b/shared/models/videos/video-resolution.enum.ts @@ -1,6 +1,6 @@ import { VideoTranscodingFPS } from './video-transcoding-fps.model' -export enum VideoResolution { +export const enum VideoResolution { H_NOVIDEO = 0, H_240P = 240, H_360P = 360, diff --git a/shared/models/videos/video-state.enum.ts b/shared/models/videos/video-state.enum.ts index a50e14e4b..31c501932 100644 --- a/shared/models/videos/video-state.enum.ts +++ b/shared/models/videos/video-state.enum.ts @@ -1,4 +1,4 @@ -export enum VideoState { +export const enum VideoState { PUBLISHED = 1, TO_TRANSCODE = 2, TO_IMPORT = 3 diff --git a/shared/models/videos/video-streaming-playlist.type.ts b/shared/models/videos/video-streaming-playlist.type.ts index 3b403f295..e2e2b93ea 100644 --- a/shared/models/videos/video-streaming-playlist.type.ts +++ b/shared/models/videos/video-streaming-playlist.type.ts @@ -1,3 +1,3 @@ -export enum VideoStreamingPlaylistType { +export const enum VideoStreamingPlaylistType { HLS = 1 } -- cgit v1.2.3