diff --git a/frontend/src/components/VideoCard.jsx b/frontend/src/components/VideoCard.jsx index 6117d9f..30de282 100644 --- a/frontend/src/components/VideoCard.jsx +++ b/frontend/src/components/VideoCard.jsx @@ -6,11 +6,12 @@ import { createDownload, toggleQueue, toggleLike, dismissDiscovery, getSettings function snippetText(desc) { if (!desc) return ""; - return desc - .replace(/https?:\/\/\S+/g, "") // strip URLs - .replace(/\n+/g, " ") // flatten newlines - .replace(/\s{2,}/g, " ") // collapse whitespace + const s = desc + .replace(/https?:\/\/\S+/g, "") + .replace(/\n+/g, " ") + .replace(/\s{2,}/g, " ") .trim(); + return s.length > 180 ? s.slice(0, 180).trimEnd() + "…" : s; } function formatDuration(secs) {