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:
parent
920b239dc1
commit
4a3f157718
@ -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();
|
||||
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user