mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-19 15:29:42 +01:00
Use fallback duration on 0 duration too.
This commit is contained in:
parent
48ebb08717
commit
c793ee092c
@ -247,7 +247,7 @@ AudioControls::onPlaybackStarted( const Tomahawk::result_ptr& result )
|
||||
|
||||
qint64 duration = AudioEngine::instance()->currentTrackTotalTime();
|
||||
|
||||
if ( duration == -1 )
|
||||
if ( duration == -1 || duration == 0 )
|
||||
duration = result.data()->track()->duration() * 1000;
|
||||
|
||||
ui->seekSlider->setRange( 0, duration );
|
||||
@ -257,6 +257,7 @@ AudioControls::onPlaybackStarted( const Tomahawk::result_ptr& result )
|
||||
ui->timeLabel->setText( TomahawkUtils::timeToString( 0 ) );
|
||||
ui->timeLeftLabel->setText( "-" + TomahawkUtils::timeToString( 0 ) );
|
||||
|
||||
tLog() << Q_FUNC_INFO << duration;
|
||||
m_sliderTimeLine.setDuration( duration );
|
||||
m_sliderTimeLine.setFrameRange( 0, duration );
|
||||
m_sliderTimeLine.setCurveShape( QTimeLine::LinearCurve );
|
||||
|
Loading…
x
Reference in New Issue
Block a user