1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-11 16:44:05 +02:00

If a tomahawk link has a xspf, be sure to load it from GAM.

This commit is contained in:
Teo Mrnjavac
2013-12-19 17:39:57 +01:00
parent 60d6ec3789
commit c18d8568c7

View File

@@ -719,23 +719,26 @@ TomahawkApp::activate()
bool
TomahawkApp::loadUrl( const QString& url )
{
QFile f( url );
QFileInfo info( f );
if ( info.suffix() == "xspf" )
if ( !url.startsWith( "tomahawk://" ) )
{
XSPFLoader* l = new XSPFLoader( true, this );
tDebug( LOGINFO ) << "Loading spiff:" << url;
l->load( QUrl::fromUserInput( url ) );
QFile f( url );
QFileInfo info( f );
if ( info.suffix() == "xspf" )
{
XSPFLoader* l = new XSPFLoader( true, this );
tDebug( LOGINFO ) << "Loading spiff:" << url;
l->load( QUrl::fromUserInput( url ) );
return true;
}
else if ( info.suffix() == "jspf" )
{
JSPFLoader* l = new JSPFLoader( true, this );
tDebug( LOGINFO ) << "Loading j-spiff:" << url;
l->load( QUrl::fromUserInput( url ) );
return true;
}
else if ( info.suffix() == "jspf" )
{
JSPFLoader* l = new JSPFLoader( true, this );
tDebug( LOGINFO ) << "Loading j-spiff:" << url;
l->load( QUrl::fromUserInput( url ) );
return true;
return true;
}
}
return GlobalActionManager::instance()->openUrl( url );