mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 06:07:37 +02:00
* Allow seeking without playlists and emit stopped() only after we actually stopped.
This commit is contained in:
@@ -162,12 +162,12 @@ AudioEngine::stop()
|
|||||||
{
|
{
|
||||||
tDebug( LOGEXTRA ) << Q_FUNC_INFO;
|
tDebug( LOGEXTRA ) << Q_FUNC_INFO;
|
||||||
|
|
||||||
emit stopped();
|
|
||||||
if ( isStopped() )
|
if ( isStopped() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
setState( Stopped );
|
setState( Stopped );
|
||||||
m_mediaObject->stop();
|
m_mediaObject->stop();
|
||||||
|
emit stopped();
|
||||||
|
|
||||||
if ( !m_playlist.isNull() )
|
if ( !m_playlist.isNull() )
|
||||||
m_playlist.data()->reset();
|
m_playlist.data()->reset();
|
||||||
@@ -180,7 +180,6 @@ AudioEngine::stop()
|
|||||||
sendWaitingNotification();
|
sendWaitingNotification();
|
||||||
|
|
||||||
Tomahawk::InfoSystem::InfoPushData pushData( s_aeInfoIdentifier, Tomahawk::InfoSystem::InfoNowStopped, QVariant(), Tomahawk::InfoSystem::PushNoFlag );
|
Tomahawk::InfoSystem::InfoPushData pushData( s_aeInfoIdentifier, Tomahawk::InfoSystem::InfoNowStopped, QVariant(), Tomahawk::InfoSystem::PushNoFlag );
|
||||||
|
|
||||||
Tomahawk::InfoSystem::InfoSystem::instance()->pushInfo( pushData );
|
Tomahawk::InfoSystem::InfoSystem::instance()->pushInfo( pushData );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -255,6 +254,10 @@ AudioEngine::canSeek()
|
|||||||
if ( m_mediaObject && m_mediaObject->isValid() )
|
if ( m_mediaObject && m_mediaObject->isValid() )
|
||||||
phononCanSeek = m_mediaObject->isSeekable();
|
phononCanSeek = m_mediaObject->isSeekable();
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if ( m_playlist.isNull() )
|
||||||
|
return phononCanSeek;
|
||||||
|
|
||||||
return !m_playlist.isNull() && ( m_playlist.data()->seekRestrictions() != PlaylistInterface::NoSeek ) && phononCanSeek;
|
return !m_playlist.isNull() && ( m_playlist.data()->seekRestrictions() != PlaylistInterface::NoSeek ) && phononCanSeek;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user