// ---------------------------------------------------------------------------
-const LAST_MIGRATION_VERSION = 575
+const LAST_MIGRATION_VERSION = 600
// ---------------------------------------------------------------------------
const BROADCAST_CONCURRENCY = 10 // How many requests in parallel we do in activitypub-http-broadcast job
const CRAWL_REQUEST_CONCURRENCY = 1 // How many requests in parallel to fetch remote data (likes, shares...)
-const JOB_REQUEST_TIMEOUT = 3000 // 3 seconds
+const JOB_REQUEST_TIMEOUT = 7000 // 7 seconds
const JOB_COMPLETED_LIFETIME = 60000 * 60 * 24 * 2 // 2 days
const VIDEO_IMPORT_TIMEOUT = 1000 * 3600 // 1 hour
'audio/x-flac': '.flac',
'audio/flac': '.flac',
'‎audio/aac': '.aac',
+ 'audio/m4a': '.m4a',
+ 'audio/mp4': '.m4a',
+ 'audio/x-m4a': '.m4a',
'audio/ac3': '.ac3'
},
EXT_MIMETYPE: null as { [ id: string ]: string }
// Express static paths (router)
const STATIC_PATHS = {
- PREVIEWS: '/static/previews/',
THUMBNAILS: '/static/thumbnails/',
TORRENTS: '/static/torrents/',
WEBSEED: '/static/webseed/',
REDUNDANCY: '/static/redundancy/',
STREAMING_PLAYLISTS: {
HLS: '/static/streaming-playlists/hls'
- },
- AVATARS: '/static/avatars/',
- VIDEO_CAPTIONS: '/static/video-captions/'
+ }
}
const STATIC_DOWNLOAD_PATHS = {
TORRENTS: '/download/torrents/',
const LAZY_STATIC_PATHS = {
AVATARS: '/lazy-static/avatars/',
PREVIEWS: '/lazy-static/previews/',
- VIDEO_CAPTIONS: '/lazy-static/video-captions/'
+ VIDEO_CAPTIONS: '/lazy-static/video-captions/',
+ TORRENTS: '/lazy-static/torrents/'
}
// Cache control
const STATIC_MAX_AGE = {
SERVER: '2h',
+ LAZY_SERVER: '2d',
CLIENT: '30d'
}
VIDEO_CAPTIONS: {
DIRECTORY: join(CONFIG.STORAGE.CACHE_DIR, 'video-captions'),
MAX_AGE: 1000 * 3600 * 3 // 3 hours
+ },
+ TORRENTS: {
+ DIRECTORY: join(CONFIG.STORAGE.CACHE_DIR, 'torrents'),
+ MAX_AGE: 1000 * 3600 * 3 // 3 hours
}
}