From 5f405d39e6877d69c5ca722b5389dd3779a7f33a Mon Sep 17 00:00:00 2001 From: vexorian Date: Mon, 27 Nov 2023 09:16:13 -0400 Subject: [PATCH] Remove gigantic logs that show all of the channel's contents some times --- src/throttler.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/throttler.js b/src/throttler.js index 10e4c67..4e2d1d0 100644 --- a/src/throttler.js +++ b/src/throttler.js @@ -7,8 +7,19 @@ function equalItems(a, b) { if ( (typeof(a) === 'undefined') || a.isOffline || b.isOffline ) { return false; } - console.log("no idea how to compare this: " + JSON.stringify(a) ); - console.log(" with this: " + JSON.stringify(b) ); + if ( + (a.type === "loading") || (a.type === "interlude") + || (b.type === "loading") || (b.type === "interlude") + ) { + return (a.type === b.type); + } + if (a.type != b.type) { + return false; + } + if (a.type !== "program") { + console.log("no idea how to compare this: " + JSON.stringify(a).slice(0,100) ); + console.log(" with this: " + JSON.stringify(b).slice(0,100) ); + } return a.title === b.title; }