Commit Graph

16 Commits

Author SHA1 Message Date
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
HumblePresent 5cd408b1c1
Remove redundant use of shell when downloading album art (#47)
* Remove redundant use of shell when downloading album art
2021-04-19 03:14:15 -07:00
HumblePresent 9848c3b8f0
Playerctl signals backend rewritten with playerctl library (#43)
* Playerctl signals backend rewritten with playerctl library

* Removed collectgarbage() calls and updated docs

* All docs updated
2021-04-18 16:33:35 -07:00
Gokul Swami 05ca7dec6e Added collects 2021-03-11 04:35:50 -08:00
Gokul Swami 631c285a75 Added a disable function to playerctl
The disable function kills all playerct follows started by the module
2021-03-10 12:52:31 -08:00
Gokul Swami 69539570c4 changed kill cmd 2021-02-17 06:08:34 -08:00
Gokul Swami 352493f475 Added a signal
Added the `player_stopped` signal to know when a player has ended.
2021-02-16 23:59:40 -08:00
Gokul Swami e56a2c2e69 playerctl bug fix 2021-02-16 21:25:19 -08:00
Gokul Swami a92a0d60ec undo logic fix that was bad 2021-02-16 21:21:29 -08:00
gokul swaminathan e881b660b6
update playerctl logic 2021-02-16 20:52:59 -08:00
Gokul Swami 601e3286d6 Put artist, title, and art under one signal 2021-02-16 17:14:26 -08:00
Gokul Swami 47515afdf9 Script Change
Turns out the link given by playerctl works now, no need to pipe through
sed.
2021-02-15 17:20:44 -08:00
Gokul Swami 2d829460ef renamed signals to signal 2021-02-15 17:16:26 -08:00