Skip to content

Commit

Permalink
Default length to 0 when mpris:length is nil (BlingCorp#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kasper24 authored Aug 15, 2021
1 parent 5ae63cd commit 0aa1a92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion signal/playerctl/playerctl_lib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ local function position_cb()
local player = manager.players[1]
if player then
local position = player:get_position() / 1000000
local length = player.metadata.value["mpris:length"] / 1000000
local length = (player.metadata.value["mpris:length"] or 0) / 1000000
if position ~= last_position or length ~= last_length then
awesome.emit_signal("bling::playerctl::position",
position,
Expand Down

0 comments on commit 0aa1a92

Please sign in to comment.