mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-11 08:34:34 +02:00
* Fixed auto-deleting Phonon's MediaSource.
This commit is contained in:
@@ -185,7 +185,9 @@ AudioEngine::loadTrack( const Tomahawk::result_ptr& result )
|
|||||||
m_input = io;
|
m_input = io;
|
||||||
|
|
||||||
if ( !m_currentTrack->url().startsWith( "http://" ) )
|
if ( !m_currentTrack->url().startsWith( "http://" ) )
|
||||||
|
{
|
||||||
m_mediaObject->setCurrentSource( io.data() );
|
m_mediaObject->setCurrentSource( io.data() );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QUrl furl = QUrl( m_currentTrack->url().left( m_currentTrack->url().indexOf( '?' ) ) );
|
QUrl furl = QUrl( m_currentTrack->url().left( m_currentTrack->url().indexOf( '?' ) ) );
|
||||||
@@ -193,6 +195,7 @@ AudioEngine::loadTrack( const Tomahawk::result_ptr& result )
|
|||||||
qDebug() << Q_FUNC_INFO << furl;
|
qDebug() << Q_FUNC_INFO << furl;
|
||||||
m_mediaObject->setCurrentSource( furl );
|
m_mediaObject->setCurrentSource( furl );
|
||||||
}
|
}
|
||||||
|
m_mediaObject->currentSource().setAutoDelete( true );
|
||||||
m_mediaObject->play();
|
m_mediaObject->play();
|
||||||
|
|
||||||
emit started( m_currentTrack );
|
emit started( m_currentTrack );
|
||||||
|
Reference in New Issue
Block a user