mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-21 13:21:52 +02:00
* Hopefully fixes the file:// issues on Windows.
This commit is contained in:
@@ -372,15 +372,20 @@ AudioEngine::loadTrack( const Tomahawk::result_ptr& result )
|
|||||||
m_isPlayingHttp = false;
|
m_isPlayingHttp = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if ( !isLocalResult( m_currentTrack->url() ) )
|
||||||
{
|
{
|
||||||
QUrl furl = m_currentTrack->url();
|
QUrl furl = m_currentTrack->url();
|
||||||
if ( !isLocalResult( m_currentTrack->url() ) && m_currentTrack->url().contains( "?" ) )
|
if ( m_currentTrack->url().contains( "?" ) )
|
||||||
{
|
{
|
||||||
furl = QUrl( m_currentTrack->url().left( m_currentTrack->url().indexOf( '?' ) ) );
|
furl = QUrl( m_currentTrack->url().left( m_currentTrack->url().indexOf( '?' ) ) );
|
||||||
furl.setEncodedQuery( QString( m_currentTrack->url().mid( m_currentTrack->url().indexOf( '?' ) + 1 ) ).toLocal8Bit() );
|
furl.setEncodedQuery( QString( m_currentTrack->url().mid( m_currentTrack->url().indexOf( '?' ) + 1 ) ).toLocal8Bit() );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_mediaObject->setCurrentSource( furl );
|
m_mediaObject->setCurrentSource( furl );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
m_mediaObject->setCurrentSource( m_currentTrack->url() );
|
||||||
|
|
||||||
m_mediaObject->currentSource().setAutoDelete( true );
|
m_mediaObject->currentSource().setAutoDelete( true );
|
||||||
m_isPlayingHttp = true;
|
m_isPlayingHttp = true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user