fix(web): count initial import from tracked videos

This commit is contained in:
kairee committed 2026-10-31 23:54:56 +08:00
1 parent 456e06f105
commit 7fcd1db987
2 files changed
+3 -1

No files matched your search

+2 -1
View File
@@ -321,7 +321,8 @@ class DashboardQueries:
initial_import_count = 0
if first_seen_ts is not None:
initial_import_count = int(conn.execute(
"SELECT COUNT(*) FROM video WHERE first_seen = ?",
"SELECT COUNT(*) FROM video WHERE first_seen = ? "
"AND status IN ('active','unfaved')",
(int(first_seen_ts),),
).fetchone()[0])
+1
View File
@@ -35,6 +35,7 @@ def test_overview():
assert overview["data_date"] == DATES[-1]
assert overview["snapshot_days"] == 3
assert overview["is_first_day"] is False
assert overview["initial_import_count"] == 2
assert overview["counts"]["active"] == 2
assert overview["counts"]["unfaved"] == 1
assert overview["counts"]["removed"] == 1