Commit Graph

11 Commits

Author SHA1 Message Date
Apeiros 03bbecfe22
Merge branch 'BlingCorp:master' into master 2024-01-29 17:37:36 -08:00
David Kosorin 31d78f8777
Playerctl lib minor bug fixes (#202)
* Fix `get_player_of_name`

* Fix `update_on_activity` initialization
2023-03-07 07:19:41 +02:00
Apeiros-46B 9c08698b28 Use cache dir instead of /tmp 2022-07-15 18:36:42 -07:00
Apeiros-46B ae9531e712 Cache album art for playerctl module 2022-07-08 15:35:24 -07:00
Kasper 338dba6292
Add playerctl v2 backends (#142)
* Add playerctl v2 backends

* Player should be the last arguement as it's optional

* Make v2 backwards compatible with v1

* Make cli v2 backwards compatible as well

* Delete playerctl and rename playerctl_v2 to playerctl

* Add deprecation for global signals

* Update the docs

* Player should be optional

* Fix image downloading failing on some cases
2022-01-07 21:33:24 -08:00
github-actions[bot] 3fc80c7dfd Auto: format source code 2021-08-27 18:01:22 +00:00
Kasper 048cf41e0a
Add playerctl lib signals debounce as a better workaround for #77 (#95)
* A better workaround for BlingCorp/bling#77

* whoops.....
2021-08-22 22:04:40 -07:00
Kasper 0aa1a92c72
Default length to 0 when mpris:length is nil (#89) 2021-08-15 01:56:50 -07:00
Kasper 5ca27551da
Fixes for the playerctl_lib signals (#77)
* Only send artUrl to the signal if it's not empty

* Fix for double signals
What I've found while using dbus-monitor is that playerctl sends a bunch of messages whenever media is changed, with the first one always having the artUrl empty.
If the media does have an artUrl, the next messages will contain the artUrl resulting in artUrl ~= last_artUrl becoming true and triggering another signal
The hacky method in the commit will only trigger a new signal if artUrl is not empty, or on the second message sent (as some media don't provide any art)

* Revert "Only send artUrl to the signal if it's not empty"

This reverts commit e74671094a.

* Fix artUrl staying the same when the new value is empty

* Revert "Fix artUrl staying the same when the new value is empty"

This reverts commit aa4ddbe863.

* Fix artUrl staying the same again

* Prevent signal with no information from being emitted

* A better workaround for the double signal issue with YouTube
2021-07-29 08:54:37 -07:00
HumblePresent ae211c2cae
Cleanup of some global functions in playerctl lib backend (#61) 2021-05-26 00:10:30 -07:00
HumblePresent fb8bf62fae
Old playerctl cli backend added as option (#49)
* Old playerctl cli backend added as option

* Move files into directory and only require playerctl lib on enable

* Added wrapper functions to select backend based on args

* Switched 'player_stopped' signal to 'no_players' in CLI backend

* Added support for setting interval directly in enable() for CLI backend

* Update docs for both backends
2021-04-24 02:37:06 -07:00