From 4bc7feab5d0aeb357c15b4336e6e5357df88f21a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraj=20Nyi=CC=81ri?= Date: Sat, 22 May 2021 00:44:00 +0200 Subject: [PATCH] Add: Unwatched count for the whole tv shows --- dist/plex-meets-homeassistant.js | 6 ++++++ src/plex-meets-homeassistant.ts | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/dist/plex-meets-homeassistant.js b/dist/plex-meets-homeassistant.js index 9cbdbb5..8ac4d96 100644 --- a/dist/plex-meets-homeassistant.js +++ b/dist/plex-meets-homeassistant.js @@ -20305,6 +20305,12 @@ class PlexMeetsHomeAssistant extends HTMLElement { }); const playButton = this.getPlayButton(); const interactiveArea = document.createElement('div'); + if (data.leafCount - data.viewedLeafCount > 0) { + const toViewElem = document.createElement('div'); + toViewElem.className = 'toViewSeason'; + toViewElem.innerHTML = (data.leafCount - data.viewedLeafCount).toString(); + interactiveArea.appendChild(toViewElem); + } interactiveArea.className = 'interactiveArea'; if (this.playController && this.playController.isPlaySupported(data)) { interactiveArea.append(playButton); diff --git a/src/plex-meets-homeassistant.ts b/src/plex-meets-homeassistant.ts index 9662d9c..b3d8252 100644 --- a/src/plex-meets-homeassistant.ts +++ b/src/plex-meets-homeassistant.ts @@ -869,6 +869,14 @@ class PlexMeetsHomeAssistant extends HTMLElement { const playButton = this.getPlayButton(); const interactiveArea = document.createElement('div'); + + if (data.leafCount - data.viewedLeafCount > 0) { + const toViewElem = document.createElement('div'); + toViewElem.className = 'toViewSeason'; + toViewElem.innerHTML = (data.leafCount - data.viewedLeafCount).toString(); + interactiveArea.appendChild(toViewElem); + } + interactiveArea.className = 'interactiveArea'; if (this.playController && this.playController.isPlaySupported(data)) { interactiveArea.append(playButton);