From 137e36e346a4641850183684ab136fe781af121a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 9 Sep 2013 07:43:24 +0000 Subject: player: reset tracklist when idle stat is detected We should return to the starting position of the tracklist if we are idle. --- lib/dtas/tracklist.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/dtas/tracklist.rb') diff --git a/lib/dtas/tracklist.rb b/lib/dtas/tracklist.rb index 01339cc..a51db32 100644 --- a/lib/dtas/tracklist.rb +++ b/lib/dtas/tracklist.rb @@ -35,6 +35,11 @@ class DTAS::Tracklist @goto_pos = nil end + def reset + @goto_pos = nil + @pos = TL_DEFAULTS["pos"] + end + def size @list.size end -- cgit v1.2.3-24-ge0c7