[Slim-Checkins] r33936 - in /7.8/trunk/server: Changelog7.html Slim/Player/TranscodingHelper.pm

[email protected] Tue, 17 Apr 2012 06:00:41 -0000
Newsgroups gmane.music.equipment.slimdevices.cvs
Message-ID <[email protected]>
Author: ayoung
Date: Mon Apr 16 23:00:41 2012
New Revision: 33936

URL: http://svn.slimdevices.com/slim?rev=33936&view=rev
Log:
Fixed bug 17950: %w macros (stream seconds duration) returns negative value 

Duration is $end - $start instead of $start - $end (duh)

Modified:
    7.8/trunk/server/Changelog7.html
    7.8/trunk/server/Slim/Player/TranscodingHelper.pm

Modified: 7.8/trunk/server/Changelog7.html
URL: http://svn.slimdevices.com/slim/7.8/trunk/server/Changelog7.html?rev=33936&r1=33935&r2=33936&view=diff
==============================================================================
--- 7.8/trunk/server/Changelog7.html (original)
+++ 7.8/trunk/server/Changelog7.html Mon Apr 16 23:00:41 2012
@@ -17,6 +17,7 @@
 		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=17758">#17758</a> - Pop up symbols linger too long on the screen</li>
 		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=17933">#17933</a> - Failure to parse m3u playlists with relative paths</li>
 		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=17937">#17937</a> - Now Playing information can alternate between station and current-track titles at track skip</li>
+		<li><a href="http://bugs.slimdevices.com/show_bug.cgi?id=17950">#17950</a> - %w macros (stream seconds duration) returns negative value</li>
 	</ul>
 	<br />
 </ul>

Modified: 7.8/trunk/server/Slim/Player/TranscodingHelper.pm
URL: http://svn.slimdevices.com/slim/7.8/trunk/server/Slim/Player/TranscodingHelper.pm?rev=33936&r1=33935&r2=33936&view=diff
==============================================================================
--- 7.8/trunk/server/Slim/Player/TranscodingHelper.pm (original)
+++ 7.8/trunk/server/Slim/Player/TranscodingHelper.pm Mon Apr 16 23:00:41 2012
@@ -515,7 +515,7 @@
 		elsif ($v eq 'u') {$value = "$end";}
 		elsif ($v eq 't') {$value = Slim::Utils::DateTime::fracSecToMinSec($start);}
 		elsif ($v eq 'v') {$value = Slim::Utils::DateTime::fracSecToMinSec($end);}
-		elsif ($v eq 'w') {$value = $start - $end;}
+		elsif ($v eq 'w') {$value = $end - $start;}
 
 		elsif ($v eq 'b') {$value = ($transcoder->{'rateLimit'} || 320) * 1000;}
 		elsif ($v eq 'B') {$value = ($transcoder->{'rateLimit'} || 320);}