openvibers/openvibe.live Commits
Hero deltas: leave hours-watched alone in the live poller
Changes
@@@ -5130,7 +5130,7 @@ curl -s https://openvibe.media/live/@Goosely/chat-insight.json | jq ".chat_insig<script src="/live-notify.js?v=3" defer></script><script src="/js/ov-skeleton.js?v=1" defer></script><script src="/js/ov-odometer.js?v=3" defer></script>--<script src="/js/app.js?v=157" defer></script>++<script src="/js/app.js?v=158" defer></script><script src="/js/stream-player.js?v=22" defer></script><script src="/js/stream-pip.js?v=1" defer></script><script src="/js/chat-shared.js?v=3" defer></script>@@@ -1598,8 +1598,11 @@ function _startHeroStatsLive() {// Deltas move too — refresh them in place rather than rebuilding the chip.const DELTA_FOR = {users: d.recent?.users, anons: d.recent?.anons,-- chatMessages: d.recent?.messages, hoursWatched: d.recent?.hours,++ chatMessages: d.recent?.messages,streamers: d.recent?.streamers,++ // hoursWatched is deliberately absent: its 7-day figure comes from OpenVibe.Media++ // (that is where VODs live now), and this endpoint only knows the local number,++ // which is zero. Overwriting it here would wipe a correct value with a wrong one.weeklyActive: { w: d.weeklyActive, pw: d.prevWeeklyActive },weeklyVisitors: { w: d.weeklyVisitors, pw: d.prevWeeklyVisitors },};@@@ -225,8 +225,11 @@ router.get('/stats-live', (req, res) => {prevWeeklyVisitors: s.prevWeeklyVisitors, prevWeeklyActive: s.prevWeeklyActive,recent: {users: s.recent?.users, anons: s.recent?.anons,-- messages: s.recent?.messages, hours: s.recent?.hours,++ messages: s.recent?.messages,streamers: s.recent?.streamers,++ // No `hours` here on purpose — the real figure comes from OpenVibe.Media and is++ // merged into the hero payload; the local number is zero and would be wrong.++},};_liveStats = { at: Date.now(), data };
@@ -5130,7 +5130,7 @@ curl -s https://openvibe.media/live/@Goosely/chat-insight.json | jq ".chat_insig
@@ -5130,7 +5130,7 @@ curl -s https://openvibe.media/live/@Goosely/chat-insight.json | jq ".chat_insig
<script src="/live-notify.js?v=3" defer></script>
<script src="/live-notify.js?v=3" defer></script>
<script src="/js/ov-skeleton.js?v=1" defer></script>
<script src="/js/ov-skeleton.js?v=1" defer></script>
<script src="/js/ov-odometer.js?v=3" defer></script>
<script src="/js/ov-odometer.js?v=3" defer></script>
-<script src="/js/app.js?v=157" defer></script>
+<script src="/js/app.js?v=158" defer></script>
<script src="/js/stream-player.js?v=22" defer></script>
<script src="/js/stream-player.js?v=22" defer></script>
<script src="/js/stream-pip.js?v=1" defer></script>
<script src="/js/stream-pip.js?v=1" defer></script>
<script src="/js/chat-shared.js?v=3" defer></script>
<script src="/js/chat-shared.js?v=3" defer></script>
@@ -1598,8 +1598,11 @@ function _startHeroStatsLive() {
@@ -1598,8 +1598,11 @@ function _startHeroStatsLive() {
// Deltas move too — refresh them in place rather than rebuilding the chip.
// Deltas move too — refresh them in place rather than rebuilding the chip.
const DELTA_FOR = {
const DELTA_FOR = {
users: d.recent?.users, anons: d.recent?.anons,
users: d.recent?.users, anons: d.recent?.anons,
- chatMessages: d.recent?.messages, hoursWatched: d.recent?.hours,
+ chatMessages: d.recent?.messages,
streamers: d.recent?.streamers,
streamers: d.recent?.streamers,
+ // hoursWatched is deliberately absent: its 7-day figure comes from OpenVibe.Media
+ // (that is where VODs live now), and this endpoint only knows the local number,
+ // which is zero. Overwriting it here would wipe a correct value with a wrong one.
weeklyActive: { w: d.weeklyActive, pw: d.prevWeeklyActive },
weeklyActive: { w: d.weeklyActive, pw: d.prevWeeklyActive },
weeklyVisitors: { w: d.weeklyVisitors, pw: d.prevWeeklyVisitors },
weeklyVisitors: { w: d.weeklyVisitors, pw: d.prevWeeklyVisitors },
};
};
@@ -225,8 +225,11 @@ router.get('/stats-live', (req, res) => {
@@ -225,8 +225,11 @@ router.get('/stats-live', (req, res) => {
prevWeeklyVisitors: s.prevWeeklyVisitors, prevWeeklyActive: s.prevWeeklyActive,
prevWeeklyVisitors: s.prevWeeklyVisitors, prevWeeklyActive: s.prevWeeklyActive,
recent: {
recent: {
users: s.recent?.users, anons: s.recent?.anons,
users: s.recent?.users, anons: s.recent?.anons,
- messages: s.recent?.messages, hours: s.recent?.hours,
+ messages: s.recent?.messages,
streamers: s.recent?.streamers,
streamers: s.recent?.streamers,
+ // No `hours` here on purpose — the real figure comes from OpenVibe.Media and is
+ // merged into the hero payload; the local number is zero and would be wrong.
+
},
},
};
};
_liveStats = { at: Date.now(), data };
_liveStats = { at: Date.now(), data };