JurajNyiri / PlexMeetsHomeAssistant

Custom card which integrates plex into Home Assistant and makes it possible to launch movies or tv shows on TV with a simple click
Apache License 2.0
111 stars 8 forks source link

Search in Safari only character by character #98

Closed m7r closed 8 months ago

m7r commented 1 year ago

Describe the bug The hole card gets reloaded after entering a key in the search field.

To Reproduce Steps to reproduce the behavior:

  1. In Safari macOS or iOS enter a character into the search field
  2. After first key the card will reload and search field lost focus
  3. Repeat on 1.

Expected behavior As in Chrome the search field should be stay active and I can type in the hole search term

Screenshots

Checks [ ] I am running Home Assistant on HTTP protocol [x] I am running BOTH Home Assistant AND Plex on HTTPS protocol [x] My Plex server is accessible through protocol, port and ip/hostname I have specified for the card. [x] My Plex server is running on HTTPS and has a valid certificate.

Card Configuration

type: custom:plex-meets-homeassistant
protocol: https
ip: plex.malamaglo.de
token: [REMOVED]
port: '443'
sort: titleSort:asc
showSearch: true
entity:
  - sonos | media_player.sonos_esszimmer
libraryName: Musik
useHorizontalScroll: 'No'
useShuffle: 'No'
displayTitleMain: 'Yes'
displaySubtitleMain: 'Yes'
displayType: '9'

Card Version 3.6.7

Plex Version 1.32.4.7195

Device information iOS 16.5.1 Safari & Homeassistant App macOS 13.4.1 Safari

fjeddy commented 1 year ago

I'm not sure why Safari is specifically mentioned here... I have the same issue in Chrome and Edge.

I would want to keep the current feature as is, and have it automatically search, but there should be a delay from when you stop typing until it actually performs a search so you don't search for every key typed.

The most common way of doing this is adding a timer, say 1000ms, that is reset everytime a user types something. Allowing you to type what you want before a search is actually performed.

As is, it's not only making my tablet hang, it's making my computer struggle as well.

JurajNyiri commented 8 months ago

Fixed in https://github.com/JurajNyiri/PlexMeetsHomeAssistant/releases/tag/3.6.11