media-server / src /getStats.mts
jbilcke-hf's picture
jbilcke-hf HF staff
initial commit
07ae658
raw
history blame
339 Bytes
import { promises as fs } from 'node:fs'
export const getStats = async () => {
const videoFilePaths = await fs.readdir(process.env.WEBTV_VIDEO_STORAGE_PATH)
const audioFilePaths = await fs.readdir(process.env.WEBTV_AUDIO_STORAGE_PATH)
return {
nbVideoFiles: videoFilePaths.length,
nbAudioFiles: audioFilePaths.length,
}
}