diff --git a/scripts/cardBuilder.js b/scripts/cardBuilder.js index fcd8b24..97f7249 100644 --- a/scripts/cardBuilder.js +++ b/scripts/cardBuilder.js @@ -401,6 +401,19 @@ cardImageContainer.appendChild(iconSpan); } + if (item.UserData?.Played) { + const cardIndicators = document.createElement('div'); + cardIndicators.className = 'cardIndicators'; + const playedIndicator = document.createElement('div'); + playedIndicator.className = 'playedIndicator indicator'; + const playedIndicatorIcon = document.createElement('span'); + playedIndicatorIcon.className = 'material-icons indicatorIcon check'; + playedIndicatorIcon.setAttribute('aria-hidden', 'true'); + playedIndicator.appendChild(playedIndicatorIcon); + cardIndicators.appendChild(playedIndicator); + cardImageContainer.appendChild(cardIndicators); + } + // Card overlay container const cardOverlayContainer = document.createElement('div'); cardOverlayContainer.className = 'cardOverlayContainer itemAction'; @@ -463,6 +476,19 @@ favoriteButton.appendChild(favoriteIcon); buttonContainer.appendChild(favoriteButton); + const moreButton = document.createElement('button'); + moreButton.setAttribute('is', 'paper-icon-button-light'); + moreButton.className = 'cardOverlayButton cardOverlayButton-hover itemAction paper-icon-button-light'; + moreButton.setAttribute('data-action', 'menu'); + moreButton.title = 'More'; + const moreIcon = document.createElement('span'); + moreIcon.className = 'material-icons cardOverlayButtonIcon cardOverlayButtonIcon-hover more_vert'; + moreIcon.setAttribute('aria-hidden', 'true'); + moreButton.appendChild(moreIcon); + + buttonContainer.appendChild(moreButton); + + // Assemble overlay cardOverlayContainer.appendChild(overlayLink); cardOverlayContainer.appendChild(playButton); diff --git a/scripts/watchlist.js b/scripts/watchlist.js index d821b76..9506e82 100644 --- a/scripts/watchlist.js +++ b/scripts/watchlist.js @@ -6852,8 +6852,13 @@ In the Custom Tabs plugin, add a new tab with the following HTML content: } } - // Add the watchlist button to the button container - buttonContainer.appendChild(watchlistButton); + // Add the watchlist button to the button container, right before the play state button if it exists + const playStateButton = buttonContainer.querySelector('button[is="emby-playstatebutton"]'); + if (playStateButton) { + buttonContainer.insertBefore(watchlistButton, playStateButton); + } else { + buttonContainer.appendChild(watchlistButton); + } } // Function to process all existing overlay containers