Playerctl lib minor bug fixes (#202)
* Fix `get_player_of_name` * Fix `update_on_activity` initialization
This commit is contained in:
parent
4fc68f7c24
commit
31d78f8777
|
@ -170,8 +170,8 @@ function playerctl:get_active_player()
|
||||||
end
|
end
|
||||||
|
|
||||||
function playerctl:get_player_of_name(name)
|
function playerctl:get_player_of_name(name)
|
||||||
for _, player in ipairs(self._private.manager.players[1]) do
|
for _, player in ipairs(self._private.manager.players) do
|
||||||
if player.name == name then
|
if player.player_name == name then
|
||||||
return player
|
return player
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -521,8 +521,11 @@ local function new(args)
|
||||||
-- Grab settings from beautiful variables if not set explicitly
|
-- Grab settings from beautiful variables if not set explicitly
|
||||||
args.ignore = args.ignore or beautiful.playerctl_ignore
|
args.ignore = args.ignore or beautiful.playerctl_ignore
|
||||||
args.player = args.player or beautiful.playerctl_player
|
args.player = args.player or beautiful.playerctl_player
|
||||||
ret.update_on_activity = args.update_on_activity or
|
if args.update_on_activity ~= nil then
|
||||||
beautiful.playerctl_update_on_activity or true
|
ret.update_on_activity = args.update_on_activity
|
||||||
|
else
|
||||||
|
ret.update_on_activity = beautiful.playerctl_update_on_activity ~= false
|
||||||
|
end
|
||||||
ret.interval = args.interval or beautiful.playerctl_position_update_interval or 1
|
ret.interval = args.interval or beautiful.playerctl_position_update_interval or 1
|
||||||
ret.debounce_delay = args.debounce_delay or beautiful.playerctl_debounce_delay or 0.35
|
ret.debounce_delay = args.debounce_delay or beautiful.playerctl_debounce_delay or 0.35
|
||||||
parse_args(ret, args)
|
parse_args(ret, args)
|
||||||
|
|
Loading…
Reference in New Issue