mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-08 07:07:05 +02:00
* Fixed loading tracks via HTTP.
This commit is contained in:
@@ -184,7 +184,15 @@ AudioEngine::loadTrack( const Tomahawk::result_ptr& result )
|
|||||||
|
|
||||||
m_input = io;
|
m_input = io;
|
||||||
|
|
||||||
|
if ( !m_currentTrack->url().startsWith( "http://" ) )
|
||||||
m_mediaObject->setCurrentSource( io.data() );
|
m_mediaObject->setCurrentSource( io.data() );
|
||||||
|
else
|
||||||
|
{
|
||||||
|
QUrl furl = QUrl( m_currentTrack->url().left( m_currentTrack->url().indexOf( '?' ) ) );
|
||||||
|
furl.setEncodedQuery( QString( m_currentTrack->url().mid( m_currentTrack->url().indexOf( '?' ) + 1 ) + "&format=xml" ).toLocal8Bit() );
|
||||||
|
qDebug() << Q_FUNC_INFO << furl;
|
||||||
|
m_mediaObject->setCurrentSource( furl );
|
||||||
|
}
|
||||||
m_mediaObject->play();
|
m_mediaObject->play();
|
||||||
|
|
||||||
emit started( m_currentTrack );
|
emit started( m_currentTrack );
|
||||||
|
Reference in New Issue
Block a user