From c2f2e3e0c627b61de44982f1cbf8c51352563fd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juraj=20Nyi=CC=81ri?= Date: Fri, 1 Oct 2021 19:11:57 +0200 Subject: [PATCH] Fix: Play buttons shown on episodes for touch devices even if target devices not available --- dist/plex-meets-homeassistant.js | 10 ++++++---- src/modules/style.ts | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/dist/plex-meets-homeassistant.js b/dist/plex-meets-homeassistant.js index e61cd97..a14b3f6 100644 --- a/dist/plex-meets-homeassistant.js +++ b/dist/plex-meets-homeassistant.js @@ -21408,12 +21408,14 @@ style.textContent = css ` .interactiveArea:hover { background: rgba(0, 0, 0, 0.3); } - button[name='playButton'].disabled, - button[name='playButton'].touchDevice { + + .movieElem .interactiveArea button[name='playButton'].touchDevice, + .seasonElem .interactiveArea button[name='playButton'].touchDevice, + button[name='playButton'].disabled { display: none !important; } - .episodeElem > .interactiveArea > button[name='playButton'].touchDevice { - display: block !important; + .episodeElem .interactiveArea button[name='playButton'].touchDevice { + display: block; outline: 0; background: orange !important; border: 2px solid orange !important; diff --git a/src/modules/style.ts b/src/modules/style.ts index ff7e8f5..6dfb3d0 100644 --- a/src/modules/style.ts +++ b/src/modules/style.ts @@ -436,12 +436,14 @@ style.textContent = css` .interactiveArea:hover { background: rgba(0, 0, 0, 0.3); } - button[name='playButton'].disabled, - button[name='playButton'].touchDevice { + + .movieElem .interactiveArea button[name='playButton'].touchDevice, + .seasonElem .interactiveArea button[name='playButton'].touchDevice, + button[name='playButton'].disabled { display: none !important; } - .episodeElem > .interactiveArea > button[name='playButton'].touchDevice { - display: block !important; + .episodeElem .interactiveArea button[name='playButton'].touchDevice { + display: block; outline: 0; background: orange !important; border: 2px solid orange !important;