1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-09 07:36:48 +02:00

little fix for duration bug

This commit is contained in:
dridri
2014-09-30 01:32:26 +02:00
committed by Uwe L. Korn
parent ce3d372749
commit 82acc6b60e

View File

@@ -1251,7 +1251,7 @@ AudioEngine::currentTrackTotalTime() const
{ {
// TODO : This is too hacky. The problem is that I don't know why // TODO : This is too hacky. The problem is that I don't know why
// libVLC doesn't report total duration for stream data (imem://) // libVLC doesn't report total duration for stream data (imem://)
if ( d_func()->currentTrack && d_func()->currentTrack->track() ) { if ( d_func()->audioOutput->totalTime() == 0 && d_func()->currentTrack && d_func()->currentTrack->track() ) {
return d_func()->currentTrack->track()->duration() * 1000 + 1000; return d_func()->currentTrack->track()->duration() * 1000 + 1000;
} }
return d_func()->audioOutput->totalTime(); return d_func()->audioOutput->totalTime();