From c4df802d7290efe0c96715db3405d7fabe4a2743 Mon Sep 17 00:00:00 2001 From: HighImKevin Date: Sat, 14 Mar 2026 15:27:37 -0400 Subject: [PATCH] Prevent Collection information being added in duplicate --- scripts/collections.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/collections.js b/scripts/collections.js index 315cab5..417a4cd 100644 --- a/scripts/collections.js +++ b/scripts/collections.js @@ -600,6 +600,15 @@ * @param {Object} item - Collection item (BoxSet) */ async function updateCollectionPage(item) { + const activePage = document.querySelector('.libraryPage:not(.hide)'); + if (!activePage) { + return; + } + + if (activePage.dataset.kefinCollectionPage === 'true') { + return; + } + const unplayedItemCount = item.UserData?.UnplayedItemCount || 0; const totalItemCount = item.RecursiveItemCount || item.ChildCount || 0; const playedItemCount = totalItemCount - unplayedItemCount; @@ -621,6 +630,7 @@ itemMiscInfoPrimary.appendChild(mediaInfoItemIncomplete); } + activePage.dataset.kefinCollectionPage = 'true'; } /**