diff --git a/dist/plex-meets-homeassistant.js b/dist/plex-meets-homeassistant.js index 4c50ca0..f47d255 100644 --- a/dist/plex-meets-homeassistant.js +++ b/dist/plex-meets-homeassistant.js @@ -19538,7 +19538,8 @@ style.textContent = css ` .movieElem { margin-bottom: 5px; background-repeat: no-repeat; - background-size: contain; + background-size: cover; + overflow: hidden; border-radius: 5px; transition: 0.5s; position: absolute; @@ -20328,7 +20329,12 @@ class PlexMeetsHomeAssistant extends HTMLElement { }); const playButton = this.getPlayButton(); const interactiveArea = document.createElement('div'); - if (data.leafCount - data.viewedLeafCount > 0) { + if (!(data.viewCount && data.viewCount > 0) && data.type === 'movie') { + const toViewElem = document.createElement('div'); + toViewElem.className = 'toViewEpisode'; + interactiveArea.appendChild(toViewElem); + } + if (data.leafCount - data.viewedLeafCount > 0 && data.type === 'show') { const toViewElem = document.createElement('div'); toViewElem.className = 'toViewSeason'; toViewElem.innerHTML = (data.leafCount - data.viewedLeafCount).toString(); diff --git a/src/modules/style.ts b/src/modules/style.ts index b505d00..b8bace5 100644 --- a/src/modules/style.ts +++ b/src/modules/style.ts @@ -258,7 +258,8 @@ style.textContent = css` .movieElem { margin-bottom: 5px; background-repeat: no-repeat; - background-size: contain; + background-size: cover; + overflow: hidden; border-radius: 5px; transition: 0.5s; position: absolute; diff --git a/src/plex-meets-homeassistant.ts b/src/plex-meets-homeassistant.ts index 618ccfa..6cb5942 100644 --- a/src/plex-meets-homeassistant.ts +++ b/src/plex-meets-homeassistant.ts @@ -867,7 +867,13 @@ class PlexMeetsHomeAssistant extends HTMLElement { const playButton = this.getPlayButton(); const interactiveArea = document.createElement('div'); - if (data.leafCount - data.viewedLeafCount > 0) { + if (!(data.viewCount && data.viewCount > 0) && data.type === 'movie') { + const toViewElem = document.createElement('div'); + toViewElem.className = 'toViewEpisode'; + interactiveArea.appendChild(toViewElem); + } + + if (data.leafCount - data.viewedLeafCount > 0 && data.type === 'show') { const toViewElem = document.createElement('div'); toViewElem.className = 'toViewSeason'; toViewElem.innerHTML = (data.leafCount - data.viewedLeafCount).toString();