Feat: video download stats (#7437)

* register job

* track downloads & display total count on stats page

* display download timeseries graph

* automated tests

* diff cleanup

* add downloads to platform stats

* remove extra semicolons

* fix lint issues

* set DB migration target

* move download stats to VideoViewModel

* rename videoView to videoStats

* lint fixes

* fix failing tests

* track remote downloads

* lint fixes

* Rename view directory to stat

* Simplify metric typing

* Do not display downloads in table

* Simplify downloads process

* Create stats tests directory

* Simplify download stats

* Fix stats fallback

* Fix redundancy

* Prevent useless log

---------

Co-authored-by: Chocobozzz <me@florianbigard.com>
This commit is contained in:
Sébastien NOBILI
2026-03-17 13:03:23 +01:00
committed by GitHub
co-authored by Chocobozzz
parent 003f358c45
commit c9855027ec
83 changed files with 959 additions and 361 deletions
+2 -2
View File
@@ -110,9 +110,9 @@ elif [ "$1" = "api-3" ]; then
npm run build:tests
videosFiles=$(findTestFiles ./packages/tests/dist/api/videos)
viewsFiles=$(findTestFiles ./packages/tests/dist/api/views)
statsFiles=$(findTestFiles ./packages/tests/dist/api/stats)
MOCHA_PARALLEL=true runJSTest "$1" $((3*$speedFactor)) $viewsFiles $videosFiles
MOCHA_PARALLEL=true runJSTest "$1" $((3*$speedFactor)) $statsFiles $videosFiles
elif [ "$1" = "api-4" ]; then
npm run build:server
npm run build:tests