Spaces:
Build error
Build error
File size: 501 Bytes
07ae658 f7f7c46 07ae658 f7f7c46 07ae658 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import { promises as fs } from 'node:fs'
export const getStats = async () => {
const videoFilePaths = await fs.readdir(process.env.WEBTV_VIDEO_STORAGE_PATH_NEXT)
const legacyVideoFilePaths = await fs.readdir(process.env.WEBTV_VIDEO_STORAGE_PATH)
const legacyAudioFilePaths = await fs.readdir(process.env.WEBTV_AUDIO_STORAGE_PATH)
return {
nbVideoFiles: videoFilePaths.length,
nbLegacyVideoFiles: legacyVideoFilePaths.length,
nbLegacyAudioFiles: legacyAudioFilePaths.length,
}
} |