mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
Using all files in file_group.files as the total count, rather than all the file_groups.
This commit is contained in:
parent
1e0725c216
commit
4e3c577202
1 changed files with 2 additions and 1 deletions
|
|
@ -688,7 +688,8 @@ def get_file_statistics():
|
|||
with get_db_curs() as curs:
|
||||
curs.execute('''
|
||||
SELECT
|
||||
COUNT(id) AS "total_count",
|
||||
-- All items in file_group.files are real individual files.
|
||||
SUM(json_array_length(files)) AS "total_count",
|
||||
COUNT(id) FILTER (WHERE file_group.mimetype = 'application/pdf') AS "pdf_count",
|
||||
COUNT(id) FILTER (WHERE file_group.mimetype = 'application/zip') AS "zip_count",
|
||||
COUNT(id) FILTER (WHERE file_group.mimetype LIKE 'video/%') AS "video_count",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue