mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-12 00:54:20 +02:00
* Fixed GStreamer pausing - even more. Sigh for Phonon's states.
This commit is contained in:
@@ -520,10 +520,6 @@ AudioEngine::onStateChanged( Phonon::State newState, Phonon::State oldState )
|
||||
if ( newState == Phonon::PlayingState )
|
||||
setState( Playing );
|
||||
|
||||
if ( !m_expectStop )
|
||||
return;
|
||||
m_expectStop = false;
|
||||
|
||||
if ( oldState == Phonon::PlayingState )
|
||||
{
|
||||
qint64 duration = m_mediaObject->totalTime() > 0 ? m_mediaObject->totalTime() : m_currentTrack->duration() * 1000;
|
||||
@@ -533,7 +529,6 @@ AudioEngine::onStateChanged( Phonon::State newState, Phonon::State oldState )
|
||||
case Phonon::PausedState:
|
||||
{
|
||||
stopped = ( duration - 1000 < m_mediaObject->currentTime() );
|
||||
|
||||
if ( !stopped )
|
||||
setState( Paused );
|
||||
|
||||
@@ -548,8 +543,9 @@ AudioEngine::onStateChanged( Phonon::State newState, Phonon::State oldState )
|
||||
break;
|
||||
}
|
||||
|
||||
if ( stopped )
|
||||
if ( stopped && m_expectStop )
|
||||
{
|
||||
m_expectStop = false;
|
||||
qDebug() << "Loading next track.";
|
||||
loadNextTrack();
|
||||
}
|
||||
|
@@ -216,14 +216,11 @@ QtScriptResolver::resolve( const Tomahawk::query_ptr& query )
|
||||
{
|
||||
if ( QThread::currentThread() != thread() )
|
||||
{
|
||||
// qDebug() << "Reinvoking in correct thread:" << Q_FUNC_INFO;
|
||||
QMetaObject::invokeMethod( this, "resolve", Qt::QueuedConnection, Q_ARG(Tomahawk::query_ptr, query) );
|
||||
return;
|
||||
}
|
||||
|
||||
qDebug() << Q_FUNC_INFO << "Resolving now with" << m_name << "-" << query->toString();
|
||||
QString eval;
|
||||
|
||||
if ( !query->isFullTextQuery() )
|
||||
{
|
||||
eval = QString( RESOLVER_LEGACY_CODE2 "resolver.resolve( '%1', '%2', '%3', '%4' );" )
|
||||
|
Reference in New Issue
Block a user