X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Finitializers%2Fconstants.ts;h=909fffdb632baf4400d37aaa9c46c76de3038880;hb=cdd838168d617f70fc04fe7f23846810e7e07082;hp=02998455982ec72433097b4435c0348a5a3bd093;hpb=9593a78ae1368a9ad8bb11044fce6fde2892701a;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 029984559..909fffdb6 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts @@ -2,7 +2,7 @@ import { CronRepeatOptions, EveryRepeatOptions } from 'bull' import { randomBytes } from 'crypto' import { invert } from 'lodash' import { join } from 'path' -import { randomInt } from '../../shared/core-utils/common/miscs' +import { randomInt, root } from '@shared/core-utils' import { AbuseState, JobType, @@ -14,17 +14,17 @@ import { VideoTranscodingFPS } from '../../shared/models' import { ActivityPubActorType } from '../../shared/models/activitypub' -import { FollowState } from '../../shared/models/actors' +import { ActorImageType, FollowState } from '../../shared/models/actors' import { NSFWPolicyType } from '../../shared/models/videos/nsfw-policy.type' import { VideoPlaylistPrivacy } from '../../shared/models/videos/playlist/video-playlist-privacy.model' import { VideoPlaylistType } from '../../shared/models/videos/playlist/video-playlist-type.model' // Do not use barrels, remain constants as independent as possible -import { isTestInstance, root, sanitizeHost, sanitizeUrl } from '../helpers/core-utils' +import { isTestInstance, parseDurationToMs, sanitizeHost, sanitizeUrl } from '../helpers/core-utils' import { CONFIG, registerConfigChangedHandler } from './config' // --------------------------------------------------------------------------- -const LAST_MIGRATION_VERSION = 670 +const LAST_MIGRATION_VERSION = 710 // --------------------------------------------------------------------------- @@ -52,7 +52,8 @@ const WEBSERVER = { WS: '', HOSTNAME: '', PORT: 0, - RTMP_URL: '' + RTMP_URL: '', + RTMPS_URL: '' } // Sortable columns per schema @@ -69,8 +70,11 @@ const SORTABLE_COLUMNS = { VIDEO_RATES: [ 'createdAt' ], BLACKLISTS: [ 'id', 'name', 'duration', 'views', 'likes', 'dislikes', 'uuid', 'createdAt' ], + INSTANCE_FOLLOWERS: [ 'createdAt', 'state', 'score' ], INSTANCE_FOLLOWING: [ 'createdAt', 'redundancyAllowed', 'state' ], + ACCOUNT_FOLLOWERS: [ 'createdAt' ], + CHANNEL_FOLLOWERS: [ 'createdAt' ], VIDEOS: [ 'name', 'duration', 'createdAt', 'publishedAt', 'originallyPublishedAt', 'views', 'likes', 'trending', 'hot', 'best' ], @@ -144,10 +148,12 @@ const JOB_ATTEMPTS: { [id in JobType]: number } = { 'video-import': 1, 'email': 5, 'actor-keys': 3, - 'videos-views': 1, + 'videos-views-stats': 1, 'activitypub-refresher': 1, 'video-redundancy': 1, 'video-live-ending': 1, + 'video-studio-edition': 1, + 'manage-video-torrent': 1, 'move-to-object-storage': 3 } // Excluded keys are jobs that can be configured by admins @@ -160,10 +166,12 @@ const JOB_CONCURRENCY: { [id in Exclude