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'
// ---------------------------------------------------------------------------
-const LAST_MIGRATION_VERSION = 675
+const LAST_MIGRATION_VERSION = 685
// ---------------------------------------------------------------------------
}
const JOB_COMPLETED_LIFETIME = 60000 * 60 * 24 * 2 // 2 days
-const VIDEO_IMPORT_TIMEOUT = 1000 * 3600 // 1 hour
+const VIDEO_IMPORT_TIMEOUT = Math.floor(JOB_TTL['video-import'] * 0.9)
const SCHEDULER_INTERVALS_MS = {
ACTOR_FOLLOW_SCORES: 60000 * 60, // 1 hour
[VideoImportState.FAILED]: 'Failed',
[VideoImportState.PENDING]: 'Pending',
[VideoImportState.SUCCESS]: 'Success',
- [VideoImportState.REJECTED]: 'Rejected'
+ [VideoImportState.REJECTED]: 'Rejected',
+ [VideoImportState.CANCELLED]: 'Cancelled',
+ [VideoImportState.PROCESSING]: 'Processing'
}
const ABUSE_STATES: { [ id in AbuseState ]: string } = {
height: 480,
minWidth: 400
}
-const ACTOR_IMAGES_SIZE = {
- AVATARS: {
- width: 120,
- height: 120
- },
- BANNERS: {
- width: 1920,
- height: 317 // 6/1 ratio
- }
+const ACTOR_IMAGES_SIZE: { [key in ActorImageType]: { width: number, height: number }[]} = {
+ [ActorImageType.AVATAR]: [
+ {
+ width: 120,
+ height: 120
+ },
+ {
+ width: 48,
+ height: 48
+ }
+ ],
+ [ActorImageType.BANNER]: [
+ {
+ width: 1920,
+ height: 317 // 6/1 ratio
+ }
+ ]
}
const EMBED_SIZE = {
languages['oc'] = 'Occitan'
languages['el'] = 'Greek'
+ // Chinese languages
+ languages['zh-Hans'] = 'Simplified Chinese'
+ languages['zh-Hant'] = 'Traditional Chinese'
+
return languages
}