From f0e4f01747da52ce5dfb42af90251445aef212ae Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Sun, 21 Mar 2010 21:00:49 +0000 Subject: Fix seeking in flacs by adjusting the skip to MM:SS from MM.SS --- lib/class/stream.class.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/class/stream.class.php') diff --git a/lib/class/stream.class.php b/lib/class/stream.class.php index a2bc181a..e1664fb4 100644 --- a/lib/class/stream.class.php +++ b/lib/class/stream.class.php @@ -668,7 +668,13 @@ class Stream { $offset = ( $start*$song->time )/( $song->size ); $offsetmm = floor($offset/60); $offsetss = floor($offset-$offsetmm*60); - $offset = sprintf("%02d.%02d",$offsetmm,$offsetss); + // If flac then format it slightly differently + if ($song->type == 'flac') { + $offset = sprintf("%02d:%02d",$offsetmm,$offsetss); + } + else { + $offset = sprintf("%02d.%02d",$offsetmm,$offsetss); + } /* Get EOF */ $eofmm = floor($song->time/60); -- cgit