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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: Customizable request timeout

redvers76 opened this issue · comments

When using a large Plex library and a slow device displaying HomeAssistant, I hit the 10s timeout that is allowed for the Plex API calls... Please can this be amended to either a) increase the timeout value as a hardcoded entry, or b) make it something that can be parameterised in the configuration?

Checks
Please check below if true:

[ ] 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
sort: originallyAvailableAt:desc
playTrailer: false
showExtras: false
showSearch: false
ip: my.plex.url
token: token
port: '443'
entity:

  • media_player.sony_kd_65xh9296
    libraryName: Films
    maxCount: '10'
    maxRows: '1'
    useHorizontalScroll: 'Yes'
    useShuffle: 'No'
    displayTitleMain: 'Yes'
    displaySubtitleMain: 'Yes'
    minWidth: ''
    minEpisodeWidth: ''
    minExpandedWidth: ''
    fontSize1: ''
    fontSize2: ''
    fontSize3: ''
    fontSize4: ''
    minExpandedHeight: ''
    title: Latest Films
    runBefore: ''
    runAfter: ''

Card Version
3.6.5

Plex Version
1.30.2.6563

Device information
Raspberry PI 2B using slow-ass wifi, running Chromium in kiosk mode on top of raspberry os

Additional context
Films library has 6611 entries... so sorting those descending takes a while ;)

This is not possible currently. You can change the value here: https://github.com/JurajNyiri/PlexMeetsHomeAssistant/blob/main/src/modules/Plex.ts#L18 in the meantime.

commented

Same problem. Several thousand movies. If I want to display by 'addedAt', by default it shows the oldest movies added, not the newest. If I try to append either :asc or :desc to 'addedAt', I hit the 10000ms timeout.

Can the change to the source be done after installation or does it need to be compiled or something?