fix(card): a total's left-out videos are "without length", not "live"

The count holds archives and upcoming streams too, which a card names a stream or upcoming.
This commit is contained in:
2026-11-07 21:58:36 +01:00
parent 90931b4750
commit 872b583f06
7 changed files with 10 additions and 9 deletions
+2 -1
View File
@@ -874,4 +874,5 @@ of a full-width panel and nothing on the right.
| 2026-11-06 | An expired share link offers no Copy (owner a) | An expired row in the share dialog has a warn badge "expired <date>" and its address struck through; Open and Revoke stay, Copy goes | The warn badge alone, Copy kept | An expired link opens nothing, so it is no link to hand out; Open still lets the owner check it |
| 2026-11-06 | The shared page's unlock button is a noun in Hungarian (owner a) | "Megtekintés" for a video, "Megnyitás" for a file or folder | Both verbs, "Megnézem" / "Megnyitom" | The app's Hungarian buttons are nouns; one button should not change grammatical form by link kind |
| 2026-11-07 | A slow link says so, with both rates (owner b1) | After 5 s of stalling on a link measured slower than the stream: "Slow connection" and "This file needs about X, about Y is arriving" under the spinner; no number measured, no claim | The line without numbers; a pill at the bottom | The viewer can tell their connection from a broken player, and by how much it falls short |
| 2026-11-07 | Text over the picture sits on a dark panel (owner a) | The player's loading, stall and error text, the subtitle notice and the track OSD sit on one dark panel (`OVER_VIDEO`, black 75 %, a white 15 % edge) | A shadow behind the letters; bare text as before | Bare white or red text was unreadable over a bright frame (seen live); the panel is the style the notices already had |
| 2026-11-07 | Text over the picture sits on a dark panel (owner a) | The player's loading, stall and error text, the subtitle notice and the track OSD sit on one dark panel (`OVER_VIDEO`, black 75 %, a white 15 % edge) | A shadow behind the letters; bare text as before | Bare white or red text was unreadable over a bright frame (seen live); the panel is the style the notices already had |
| 2026-11-07 | A total's left-out videos are "without length" (owner b) | A summed length names what it left out as "+N without length" / "+N hossz nélkül" | "+N live" as before; "+N stream" | The count holds archives and upcoming streams too, which a card calls a stream or upcoming: "live" there named only one of them (One name per feature) |
@@ -10,7 +10,7 @@ export function isLiveWithoutLength(v: Pick<Video, "duration_seconds" | "live_st
return v.duration_seconds == null && v.live_status !== "none";
}
/** "12 hr 5 min +2 live": `total` is the formatted sum ("" when nothing summed), `live` the count
/** "12 hr 5 min +2 without length": `total` is the formatted sum ("" when nothing summed), `live` the count
* it left out. Empty when both are. */
export function withLiveCount(total: string, live: number, t: TFunction): string {
const suffix = live > 0 ? t("card.liveWithoutLength", { count: live }) : "";
+2 -2
View File
@@ -16,8 +16,8 @@
"restart": "Restart",
"play": "Play",
"stream": "stream",
"liveWithoutLength_one": "+{{count}} live",
"liveWithoutLength_other": "+{{count}} live",
"liveWithoutLength_one": "+{{count}} without length",
"liveWithoutLength_other": "+{{count}} without length",
"views": "views",
"info": "Details",
"noDescription": "No description",
+2 -2
View File
@@ -16,8 +16,8 @@
"restart": "Elölről",
"play": "Lejátszás",
"stream": "közvetítés",
"liveWithoutLength_one": "+{{count}} élő",
"liveWithoutLength_other": "+{{count}} élő",
"liveWithoutLength_one": "+{{count}} hossz nélkül",
"liveWithoutLength_other": "+{{count}} hossz nélkül",
"views": "megtekintés",
"info": "Részletek",
"noDescription": "Nincs leírás",
+1 -1
View File
@@ -77,7 +77,7 @@ export interface ManagedChannel {
* subscribe made here. */
added_at: string;
total_duration_seconds: number;
/** Live videos the total cannot hold (no length): the "+N live" beside it. */
/** Live videos the total cannot hold (no length): the "+N without length" beside it. */
live_without_length: number;
priority: number;
hidden: boolean;
+1 -1
View File
@@ -17,7 +17,7 @@ export interface Playlist {
dirty: boolean; // linked local playlist has edits not yet pushed to YouTube
item_count: number;
total_duration_seconds: number;
/** Live videos the total cannot hold (no length): the "+N live" beside it. */
/** Live videos the total cannot hold (no length): the "+N without length" beside it. */
live_without_length: number;
cover_thumbnail: string | null;
updated_at: string; // ISO; when the list last CHANGED (rename, add/remove/move/reorder)
+1 -1
View File
@@ -567,7 +567,7 @@ function PlaylistDetail() {
// Total playtime of the whole playlist (sums every item, matching the itemCount beside it — not
// the filtered `shown` set). Items with an unknown duration count as 0, and a live one is named
// beside the sum instead ("+2 live"); hidden when there is neither.
// beside the sum instead ("+2 without length"); hidden when there is neither.
const totalSeconds = useMemo(
() => items.reduce((acc, v) => acc + (v.duration_seconds ?? 0), 0),
[items],