jbilcke-hf HF staff commited on
Commit
80c5d2a
·
1 Parent(s): 829a831
Files changed (1) hide show
  1. src/getStats.mts +14 -0
src/getStats.mts CHANGED
@@ -4,7 +4,9 @@ export const getStats = async () => {
4
  let nbVideos1 = 0
5
  let nbVideos2 = 0
6
  let nbVideos3 = 0
 
7
  let nbVideos4 = 0
 
8
 
9
  try {
10
  const video1 = await fs.readdir(process.env.WEBTV_VIDEO_STORAGE_PATH_CHANNEL_1)
@@ -21,16 +23,28 @@ export const getStats = async () => {
21
  nbVideos3 = video3.length
22
  } catch (err) {}
23
 
 
 
 
 
 
24
  try {
25
  const video4 = await fs.readdir(process.env.WEBTV_VIDEO_STORAGE_PATH_CHANNEL_4)
26
  nbVideos4 = video4.length
27
  } catch (err) {}
28
 
 
 
 
 
 
29
  return {
30
  nbVideos1,
31
  nbVideos2,
32
  nbVideos3,
 
33
  nbVideos4,
 
34
 
35
  }
36
  }
 
4
  let nbVideos1 = 0
5
  let nbVideos2 = 0
6
  let nbVideos3 = 0
7
+ let nbArchivedVideos3 = 0
8
  let nbVideos4 = 0
9
+ let nbArchivedVideos4 = 0
10
 
11
  try {
12
  const video1 = await fs.readdir(process.env.WEBTV_VIDEO_STORAGE_PATH_CHANNEL_1)
 
23
  nbVideos3 = video3.length
24
  } catch (err) {}
25
 
26
+ try {
27
+ const archivedVideo3 = await fs.readdir(process.env.WEBTV_VIDEO_ARCHIVE_PATH_CHANNEL_3)
28
+ nbArchivedVideos3 = archivedVideo3.length
29
+ } catch (err) {}
30
+
31
  try {
32
  const video4 = await fs.readdir(process.env.WEBTV_VIDEO_STORAGE_PATH_CHANNEL_4)
33
  nbVideos4 = video4.length
34
  } catch (err) {}
35
 
36
+ try {
37
+ const archivedVideo4 = await fs.readdir(process.env.WEBTV_VIDEO_ARCHIVE_PATH_CHANNEL_4)
38
+ nbArchivedVideos4 = archivedVideo4.length
39
+ } catch (err) {}
40
+
41
  return {
42
  nbVideos1,
43
  nbVideos2,
44
  nbVideos3,
45
+ nbArchivedVideos3,
46
  nbVideos4,
47
+ nbArchivedVideos4,
48
 
49
  }
50
  }