openvibers/openvibe.live Commits

Live: home paste counts come only from Community (#100)

OP OpenVibers committed 11 Oct 2026 · 33ba495850 · 1 file, +5 −4

Live's home stats copied `pastes`, `pasteImages` and `pasteText` from Media's app stats, then let Community's numbers overwrite them. Media no longer carries those keys (its frozen paste tables are dropped in the matching OpenVibe.Media change), so paste counts now come only from Community, the paste authority. They stay `null` when Community does not answer, exactly as before. Covering tests pass.

Changes

ddiff --git a/server/media-proxy/lookups.js b/server/media-proxy/lookups.js
iindex 4bd4376f..8308dd99 100644
---- a/server/media-proxy/lookups.js
++++ b/server/media-proxy/lookups.js
@@@ -356,16 +356,17 @@ async function sitePasteStats() {
/**
* The archive counters on top of Live's own stats: VODs, clips, hours from Media; pastes from
-- * Community (or Media). Fields stay null when neither answered.
++ * Community, the paste authority (Media stopped carrying paste counts). Fields stay null when the
++ * service that owns them did not answer.
*/
async function withArchiveStats(stats) {
const [m, p] = await Promise.all([siteMediaStats(), sitePasteStats()]);
++ stats.pastes = null;
++ stats.pasteImages = null;
++ stats.pasteText = null;
if (m) {
stats.vods = m.vods;
stats.clips = m.clips;
-- stats.pastes = m.pastes;
-- stats.pasteImages = m.pasteImages;
-- stats.pasteText = m.pasteText;
stats.streamHours = Math.round((m.durationSeconds || 0) / 3600);
stats.recent = { ...stats.recent, vods: m.recent?.vods, clips: m.recent?.clips, hours: m.recent?.hours };
}