From 91bd895e52624caccfcb56ad63c4e2f4b0c1e6c3 Mon Sep 17 00:00:00 2001 From: BoulderBadgeDad Date: Wed, 17 Jun 2026 13:37:15 -0700 Subject: [PATCH] YouTube channels: follow = watchlist only (clean toast) + drop the misleading '90 videos' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two reports: - 'Following · 0 videos added' toast: following from the channel page sent a stub with no videos, so 0 were wished. Watchlisting a channel shouldn't bulk- wish its whole catalog anyway (that conflates watchlist/track with wishlist/ acquire, unlike TV shows). follow() now sends only the channel fields and the toast reads 'Added to watchlist'. Videos are wished explicitly via + Wish. - '90 videos' in every channel header: that was just our fetch cap (limit=90), not the real total — YouTube no longer exposes a trustworthy channel video count (videoCountText reports a shelf count: 142 for Veritasium, 71 for MrBeast). Dropped it; the accurate subscriber count already conveys the channel's scale. --- webui/static/video/video-detail.js | 5 +++-- webui/static/video/video-search.js | 2 +- webui/static/video/video-youtube.js | 8 +++++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/webui/static/video/video-detail.js b/webui/static/video/video-detail.js index e56ba93a..0b673daf 100644 --- a/webui/static/video/video-detail.js +++ b/webui/static/video/video-detail.js @@ -167,7 +167,8 @@ meta.push('YouTube'); var yc = window.VideoYoutube; var subs = yc && yc.compactCount(d.subscriber_count); if (subs) meta.push('' + subs + ' subscribers'); - if (d.video_count != null) meta.push('' + esc(d.video_count) + ' videos'); + // NB: no "N videos" — YouTube doesn't expose a reliable total, and what we + // fetch is just the recent page (the cap), so showing it would mislead. var views = yc && yc.compactCount(d.view_count); if (views) meta.push('' + views + ' views'); if (d.handle) meta.push('' + esc(d.handle) + ''); var mm = q('[data-vd-meta]'); if (mm) mm.innerHTML = meta.join(''); @@ -1461,7 +1462,7 @@ else yc.follow({ youtube_id: ch.youtube_id, title: ch.title, avatar_url: ch.avatar_url }).then(function (d) { if (d && d.success) { data.following = true; renderActions(data); // toggle in place — no page reload - if (typeof showToast === 'function') showToast('Following · ' + (d.added_videos || 0) + ' videos added', 'success'); + if (typeof showToast === 'function') showToast('Added to watchlist', 'success'); document.dispatchEvent(new CustomEvent('soulsync:video-wishlist-changed')); } }).catch(function () { /* ignore */ }); diff --git a/webui/static/video/video-search.js b/webui/static/video/video-search.js index 8597d3e4..3a830811 100644 --- a/webui/static/video/video-search.js +++ b/webui/static/video/video-search.js @@ -248,7 +248,7 @@ if (d && d.success) { btn.classList.add('vyt-follow--on'); btn.innerHTML = '✓ Following'; if (typeof showToast === 'function') - showToast('Following ' + lastChannel.title + ' · ' + (d.added_videos || 0) + ' videos added', 'success'); + showToast('Added ' + lastChannel.title + ' to watchlist', 'success'); } done(); }).catch(function () { btn.disabled = false; }); diff --git a/webui/static/video/video-youtube.js b/webui/static/video/video-youtube.js index 4234469b..01205c65 100644 --- a/webui/static/video/video-youtube.js +++ b/webui/static/video/video-youtube.js @@ -106,7 +106,13 @@ body: JSON.stringify(body || {}) }).then(function (r) { return r.ok ? r.json() : null; }); } - function follow(channel) { return post('/api/video/youtube/follow', { channel: channel }); } + // Following a channel WATCHLISTS it (like a show) — it doesn't auto-wish all + // its videos, so we send only the channel fields, not its video list. + function follow(channel) { + var ch = channel || {}; + return post('/api/video/youtube/follow', + { channel: { youtube_id: ch.youtube_id, title: ch.title, avatar_url: ch.avatar_url } }); + } function unfollow(youtubeId) { return post('/api/video/youtube/unfollow', { youtube_id: youtubeId }); } function removeWish(scope, sourceId) { return post('/api/video/youtube/wishlist/remove', { scope: scope, source_id: sourceId });