1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-24 01:39:42 +01:00

* Fixed GStreamer skipping to the next track on pausing.

This commit is contained in:
Christian Muehlhaeuser 2011-07-20 00:17:15 +02:00
parent 920b239dc1
commit 4a3f157718
2 changed files with 20 additions and 2 deletions

View File

@ -520,7 +520,25 @@ AudioEngine::onStateChanged( Phonon::State newState, Phonon::State oldState )
if ( oldState == Phonon::PlayingState )
{
if ( newState == Phonon::PausedState || newState == Phonon::StoppedState )
qint64 duration = m_mediaObject->totalTime() > 0 ? m_mediaObject->totalTime() : m_currentTrack->duration() * 1000;
bool stopped = false;
switch ( newState )
{
case Phonon::PausedState:
{
stopped = ( duration - 1000 < m_mediaObject->currentTime() );
break;
}
case Phonon::StoppedState:
{
stopped = true;
break;
}
default:
break;
}
if ( stopped )
{
qDebug() << "Loading next track.";
loadNextTrack();

View File

@ -105,7 +105,7 @@ Database::enqueue( QSharedPointer<DatabaseCommand> lc )
happyThread = worker;
}
qDebug() << "Enqueueing command to thread:" << happyThread << busyThreads << lc->commandname();
// qDebug() << "Enqueueing command to thread:" << happyThread << busyThreads << lc->commandname();
happyThread->enqueue( lc );
}
}