From c4f46e87e583e25c77d70785adba8d7c179161cf Mon Sep 17 00:00:00 2001 From: Andrew Ruthven Date: Wed, 12 Jun 2013 00:43:21 +1200 Subject: [PATCH] Increment the timer, fetchCurrent at end of song. --- lib/EtcX/Sounds.pm | 4 +- views/index.tt | 85 ++++++++++++++++++++++++++++++++++++++++--- views/layouts/main.tt | 20 ---------- 3 files changed, 82 insertions(+), 27 deletions(-) diff --git a/lib/EtcX/Sounds.pm b/lib/EtcX/Sounds.pm index 7c46eee..e2d7a89 100644 --- a/lib/EtcX/Sounds.pm +++ b/lib/EtcX/Sounds.pm @@ -63,8 +63,8 @@ ajax '/current/' => sub { album => $song->album, title => $song->title, artist => $song->artist, - sofar => $time->sofar, - total => $time->total, + sofar => $time->seconds_sofar * 1000, + total => $time->seconds_total * 1000, } } else { return { diff --git a/views/index.tt b/views/index.tt index aab9170..948408a 100644 --- a/views/index.tt +++ b/views/index.tt @@ -8,7 +8,11 @@

[% msg %]

[% END %] -
+
+
+
+ 0:00 of 0:00 +
[% FOR list IN playlist -%] @@ -17,14 +21,85 @@