]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/static.ts
stricter youtubedl format selectors (#3516)
[github/Chocobozzz/PeerTube.git] / server / controllers / static.ts
index f12f00e1bba3fcbf72ecd89a4939c66018513ce7..a7b28704ca4c2569bb33c31980276bb1db3e72d7 100644 (file)
@@ -19,13 +19,14 @@ import { VideoCommentModel } from '../models/video/video-comment'
 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'
 
@@ -206,7 +207,7 @@ export {
 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')) {
@@ -229,7 +230,9 @@ async function generateNodeinfo (req: express.Request, res: express.Response) {
       openRegistrations: CONFIG.SIGNUP.ENABLED,
       usage: {
         users: {
-          total: totalUsers
+          total: totalUsers,
+          activeMonth: totalMonthlyActiveUsers,
+          activeHalfyear: totalHalfYearActiveUsers
         },
         localPosts: totalVideos,
         localComments: totalLocalVideoComments