fix(channels): the Length column shows the sum alone

The "+N without length" line did not fit the 4.5 rem column (88 px of
text in a 56 px cell) and spilled into Tags. The owner wants no such
line there: the cell shows the summed hours, and the channel list no
longer sends a count nothing reads. A playlist's total keeps it.
This commit is contained in:
2026-11-08 00:10:28 +01:00
parent 4d058cba81
commit 55cbbfb6e4
9 changed files with 25 additions and 22 deletions
+1 -3
View File
@@ -46,12 +46,11 @@ def list_channels(user: User = Depends(current_user), db: Session = Depends(get_
# computed here — the manager table dropped its N/S/L column.)
channel_ids = [c.id for _, c in rows]
agg: dict[str, dict] = {}
for cid, n, last_up, total_dur, live in queries.aggregates(db, channel_ids):
for cid, n, last_up, total_dur in queries.aggregates(db, channel_ids):
agg[cid] = {
"stored": n,
"last_video_at": iso(last_up),
"total_duration_seconds": int(total_dur or 0),
"live_without_length": live,
}
# Channels already in the *global* deep-backfill queue — i.e. at least one user (any
@@ -69,7 +68,6 @@ def list_channels(user: User = Depends(current_user), db: Session = Depends(get_
"stored_videos": (agg.get(ch.id) or {}).get("stored", 0),
"last_video_at": (agg.get(ch.id) or {}).get("last_video_at"),
"total_duration_seconds": (agg.get(ch.id) or {}).get("total_duration_seconds", 0),
"live_without_length": (agg.get(ch.id) or {}).get("live_without_length", 0),
"priority": sub.priority,
"hidden": sub.hidden,
"deep_requested": sub.deep_requested,