mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 22:26:32 +02:00
* Fixed not closing obsolete transfers.
This commit is contained in:
@@ -185,7 +185,6 @@ AudioEngine::loadTrack( const Tomahawk::result_ptr& result )
|
|||||||
err = true;
|
err = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !err )
|
if ( !err )
|
||||||
@@ -195,15 +194,19 @@ AudioEngine::loadTrack( const Tomahawk::result_ptr& result )
|
|||||||
|
|
||||||
if ( !m_input.isNull() || m_isPlayingHttp )
|
if ( !m_input.isNull() || m_isPlayingHttp )
|
||||||
{
|
{
|
||||||
|
if ( !m_input.isNull() )
|
||||||
|
{
|
||||||
|
m_input->close();
|
||||||
|
m_input.clear();
|
||||||
|
}
|
||||||
|
|
||||||
m_expectStop = true;
|
m_expectStop = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
m_mediaObject->currentSource().setAutoDelete( true );
|
|
||||||
|
|
||||||
if ( !isHttpResult( m_currentTrack->url() ) )
|
if ( !isHttpResult( m_currentTrack->url() ) )
|
||||||
{
|
{
|
||||||
m_mediaObject->setCurrentSource( io.data() );
|
m_mediaObject->setCurrentSource( io.data() );
|
||||||
|
m_mediaObject->currentSource().setAutoDelete( false );
|
||||||
m_isPlayingHttp = false;
|
m_isPlayingHttp = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -216,6 +219,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_isPlayingHttp = true;
|
m_isPlayingHttp = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user