12 /^time: +[0-9]+:[0-9]+$/ {
14 seconds_current = time[1]
15 seconds_total = time[2]
17 hours = int(seconds_current / 60 / 60);
18 secs_beyond_hours = seconds_current - (hours * 60 * 60);
19 mins = int(secs_beyond_hours / 60);
20 secs = secs_beyond_hours - (mins * 60);
22 current_time = sprintf("%d:%.2d:%.2d", hours, mins, secs)
24 current_time = sprintf("%.2d:%.2d", mins, secs)
27 if (seconds_total > 0) {
28 time_percentage = (seconds_current / seconds_total) * 100
29 current_percentage = sprintf("%d%%", time_percentage)
31 current_percentage = "~"
36 state = status["state:"]
38 if (state == "play") {
40 } else if (state == "pause") {
42 } else if (state == "stop") {
50 status["state:"], current_time, current_percentage\
This page took 0.064206 seconds and 5 git commands to generate.