feat: Add cover art support for user client
This commit adds support for displaying cover art from the currently playing media in the Home Assistant user client. - The `HassUserClient` now publishes cover art to the `user/image/cover` MQTT topic. - The `publish_cover` method uses `playerctl` to retrieve the art URL and `pillow` to convert the image to WebP format before publishing. - The `components` property now includes an `image` component for cover art. - The `cover` attribute on `HassUserClient` is used to avoid resending the same cover multiple times. - The `publish_state` method has been extended to spawn a thread for updating the cover.
This commit is contained in:
parent
45f7fc4741
commit
e54223e361
6 changed files with 148 additions and 26 deletions
2
PKGBUILD
2
PKGBUILD
|
@ -15,7 +15,7 @@ arch=(any)
|
|||
url="https://git.edgarpierre.fr/edpibu/hasspy"
|
||||
license=('GPL-3.0-or-later')
|
||||
groups=()
|
||||
depends=('python-paho-mqtt')
|
||||
depends=('python-paho-mqtt' 'python-pillow')
|
||||
makedepends=('git' 'uv' 'python-installer') # 'bzr', 'git', 'mercurial' or 'subversion'
|
||||
provides=("${pkgname%-git}")
|
||||
conflicts=("${pkgname%-git}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue