summaryrefslogtreecommitdiffstats
path: root/lib/class/stream.class.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2010-03-21 21:00:49 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2010-03-21 21:00:49 +0000
commitf0e4f01747da52ce5dfb42af90251445aef212ae (patch)
tree04592f5aee5c76c96802c4fb476f85456dfa9bae /lib/class/stream.class.php
parent3ce42f5e88ea4bec2ef832fe33a2efc0b5b5fc8e (diff)
downloadampache-f0e4f01747da52ce5dfb42af90251445aef212ae.tar.gz
ampache-f0e4f01747da52ce5dfb42af90251445aef212ae.tar.bz2
ampache-f0e4f01747da52ce5dfb42af90251445aef212ae.zip
Fix seeking in flacs by adjusting the skip to MM:SS from MM.SS
Diffstat (limited to 'lib/class/stream.class.php')
-rw-r--r--lib/class/stream.class.php8
1 files changed, 7 insertions, 1 deletions
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);