diff --git a/controllers/utilsController.js b/controllers/utilsController.js index 3794829..eb4a00a 100644 --- a/controllers/utilsController.js +++ b/controllers/utilsController.js @@ -967,9 +967,12 @@ self.stats = async (req, res, next) => { activeAlbums.push(album.id) if (album.download) stats[data.title].Downloadable++ if (album.public) stats[data.title].Public++ - if (album.zipGeneratedAt) stats[data.title]['ZIP Generated']++ } + await paths.readdir(paths.zips).then(files => { + stats[data.title]['ZIP Generated'] = files.length + }).catch(() => {}) + stats[data.title]['Files in albums'] = await db.table('files') .whereIn('albumid', activeAlbums) .count('id as count')