import { HttpNodeinfoDiasporaSoftwareNsSchema20 } from '../../shared/models/nodeinfo'
import { join } from 'path'
import { root } from '../helpers/core-utils'
+import { getEnabledResolutions } from '../lib/video-transcoding'
import { CONFIG, isEmailEnabled } from '../initializers/config'
import { getPreview, getVideoCaption } from './lazy-static'
import { VideoStreamingPlaylistType } from '@shared/models/videos/video-streaming-playlist.type'
import { MVideoFile, MVideoFullLight } from '@server/types/models'
import { getTorrentFilePath, getVideoFilePath } from '@server/lib/video-paths'
import { getThemeOrDefault } from '../lib/plugins/theme-utils'
-import { getEnabledResolutions, getRegisteredPlugins, getRegisteredThemes } from '@server/controllers/api/config'
+import { getRegisteredPlugins, getRegisteredThemes } from '@server/controllers/api/config'
import { HttpStatusCode } from '@shared/core-utils/miscs/http-error-codes'
import { serveIndexHTML } from '@server/lib/client-html'
async function generateNodeinfo (req: express.Request, res: express.Response) {
const { totalVideos } = await VideoModel.getStats()
const { totalLocalVideoComments } = await VideoCommentModel.getStats()
- const { totalUsers } = await UserModel.getStats()
+ const { totalUsers, totalMonthlyActiveUsers, totalHalfYearActiveUsers } = await UserModel.getStats()
let json = {}
if (req.params.version && (req.params.version === '2.0')) {
openRegistrations: CONFIG.SIGNUP.ENABLED,
usage: {
users: {
- total: totalUsers
+ total: totalUsers,
+ activeMonth: totalMonthlyActiveUsers,
+ activeHalfyear: totalHalfYearActiveUsers
},
localPosts: totalVideos,
localComments: totalLocalVideoComments