From 62004a23486e0905cfa406b46c3c919bb549c4ee Mon Sep 17 00:00:00 2001 From: Breizh Date: Sat, 13 Aug 2022 02:51:05 +0200 Subject: [PATCH] Correction du temps total pour des morceaux distants --- .i3blocks/mpd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.i3blocks/mpd b/.i3blocks/mpd index fea39dd..9087be4 100755 --- a/.i3blocks/mpd +++ b/.i3blocks/mpd @@ -167,7 +167,8 @@ do declare -i time_elapsed time_total time_left - time_total="${o["Time"]:--1}" + time_total="${o["time"]#*:}" + [[ "$time_total" -eq 0 ]] && time_total="${o["Time"]}" [[ "$time_total" -eq 0 ]] && time_total=-1 if [[ "${o["state"]}" == "stop" ]] then