mini-media-player icon indicating copy to clipboard operation
mini-media-player copied to clipboard

Cover image keeps disappearing when using Android TV (ADB)

Open adamzimnyy opened this issue 3 years ago • 4 comments

v.1.13

I am using an android tv box, integrated into home assistant with ADB. It uses adb shell to get screencaps of the device to display them as cover image.

Card:

type: custom:mini-media-player
entity: media_player.androidtv_mibox_adam
artwork: full-cover

adb1

Here's the issue I'm having. Frequently, the image disappears and only a white/grey background is shown, only to reappear a second later. What I suppose is happening, is the adb shell is not responding fast enough with the images or there is a limit of number of queries in a given timeframe so the requests are being rejected, and when the card does not receive one it clears the displayed image and shows blank.

adb2

Proposed solution would be to keep the previous image until the next image has been received and is ready to be displayed.

adamzimnyy avatar Sep 17 '21 08:09 adamzimnyy

Hello, Would you be able to debug this further and check what the picture attribute is set to when it shows as blank?

kalkih avatar Oct 01 '21 08:10 kalkih

Sorry it took me a while to get back to it.

I lowered the refresh rate of the media player entity and it's happening a lot less so it was harder to notice, but as far as I can tell, the entity_picture attribute is still a link to a file even when it's blank, just the number on the end changes after every refresh

entity_picture: /api/media_player_proxy/media_player.androidtv_mibox_adam?token=[redacted]&cache=1633636681.028589

adamzimnyy avatar Oct 08 '21 16:10 adamzimnyy

Alright, yes that's probably the issue then. Not much I can do about this I believe, unfortunately.

kalkih avatar Oct 08 '21 19:10 kalkih

this happens with the built-in media player too, FYI.

jherby2k avatar Feb 22 '22 13:02 jherby2k