// ---------------------------------------------------------------------------
-const LAST_MIGRATION_VERSION = 505
+const LAST_MIGRATION_VERSION = 515
// ---------------------------------------------------------------------------
VIDEOS: [ 'name', 'duration', 'createdAt', 'publishedAt', 'originallyPublishedAt', 'views', 'likes', 'trending' ],
+ // Don't forget to update peertube-search-index with the same values
VIDEOS_SEARCH: [ 'name', 'duration', 'createdAt', 'publishedAt', 'originallyPublishedAt', 'views', 'likes', 'match' ],
VIDEO_CHANNELS_SEARCH: [ 'match', 'displayName', 'createdAt' ],
const TRACKER_RATE_LIMITS = {
INTERVAL: 60000 * 5, // 5 minutes
ANNOUNCES_PER_IP_PER_INFOHASH: 15, // maximum announces per torrent in the interval
- ANNOUNCES_PER_IP: 30 // maximum announces for all our torrents in the interval
+ ANNOUNCES_PER_IP: 30, // maximum announces for all our torrents in the interval
+ BLOCK_IP_LIFETIME: 60000 * 10 // 10 minutes
}
const P2P_MEDIA_LOADER_PEER_VERSION = 2
// ---------------------------------------------------------------------------
+const SEARCH_INDEX = {
+ ROUTES: {
+ VIDEOS: '/api/v1/search/videos',
+ VIDEO_CHANNELS: '/api/v1/search/video-channels'
+ }
+}
+
+// ---------------------------------------------------------------------------
+
// Special constants for a test instance
if (isTestInstance() === true) {
PRIVATE_RSA_KEY_SIZE = 1024
API_VERSION,
PEERTUBE_VERSION,
LAZY_STATIC_PATHS,
+ SEARCH_INDEX,
HLS_REDUNDANCY_DIRECTORY,
P2P_MEDIA_LOADER_PEER_VERSION,
AVATARS_SIZE,