mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 19:30:21 +02:00
Whitelist rtmp:// to passed as plain URL to Phonon
This commit is contained in:
@@ -627,7 +627,8 @@ AudioEngine::loadTrack( const Tomahawk::result_ptr& result )
|
||||
|
||||
setCurrentTrack( result );
|
||||
|
||||
if ( !TomahawkUtils::isLocalResult( d->currentTrack->url() ) && !TomahawkUtils::isHttpResult( d->currentTrack->url() ) )
|
||||
if ( !TomahawkUtils::isLocalResult( d->currentTrack->url() ) && !TomahawkUtils::isHttpResult( d->currentTrack->url() )
|
||||
&& !TomahawkUtils::isRtmpResult( d->currentTrack->url() ) )
|
||||
{
|
||||
boost::function< void ( QSharedPointer< QIODevice >& ) > callback =
|
||||
boost::bind( &AudioEngine::performLoadTrack, this, result, _1 );
|
||||
@@ -655,7 +656,7 @@ AudioEngine::performLoadTrack( const Tomahawk::result_ptr& result, QSharedPointe
|
||||
|
||||
bool err = false;
|
||||
{
|
||||
if ( !( TomahawkUtils::isLocalResult( d->currentTrack->url() ) || TomahawkUtils::isHttpResult( d->currentTrack->url() ) )
|
||||
if ( !( TomahawkUtils::isLocalResult( d->currentTrack->url() ) || TomahawkUtils::isHttpResult( d->currentTrack->url() ) || TomahawkUtils::isRtmpResult( d->currentTrack->url() ) )
|
||||
&& ( !io || io.isNull() ) )
|
||||
{
|
||||
tLog() << "Error getting iodevice for" << result->url();
|
||||
@@ -668,7 +669,8 @@ AudioEngine::performLoadTrack( const Tomahawk::result_ptr& result, QSharedPointe
|
||||
d->state = Loading;
|
||||
emit loading( d->currentTrack );
|
||||
|
||||
if ( !TomahawkUtils::isLocalResult( d->currentTrack->url() ) && !TomahawkUtils::isHttpResult( d->currentTrack->url() ) )
|
||||
if ( !TomahawkUtils::isLocalResult( d->currentTrack->url() ) && !TomahawkUtils::isHttpResult( d->currentTrack->url() )
|
||||
&& !TomahawkUtils::isRtmpResult( d->currentTrack->url() ) )
|
||||
{
|
||||
QSharedPointer<QNetworkReply> qnr = io.objectCast<QNetworkReply>();
|
||||
if ( !qnr.isNull() )
|
||||
|
@@ -554,6 +554,13 @@ isLocalResult( const QString& url )
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
isRtmpResult( const QString& url )
|
||||
{
|
||||
return url.startsWith( "rtmp://" );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
crash()
|
||||
{
|
||||
|
@@ -172,6 +172,7 @@ namespace TomahawkUtils
|
||||
*/
|
||||
DLLEXPORT bool isHttpResult( const QString& url );
|
||||
DLLEXPORT bool isLocalResult( const QString& url );
|
||||
DLLEXPORT bool isRtmpResult( const QString& url );
|
||||
|
||||
DLLEXPORT bool verifyFile( const QString& filePath, const QString& signature );
|
||||
DLLEXPORT QString extractScriptPayload( const QString& filename, const QString& resolverId, const QString& dirName = "atticaresolvers" );
|
||||
|
Reference in New Issue
Block a user