mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-12 00:54:20 +02:00
If a tomahawk link has a xspf, be sure to load it from GAM.
This commit is contained in:
@@ -719,23 +719,26 @@ TomahawkApp::activate()
|
|||||||
bool
|
bool
|
||||||
TomahawkApp::loadUrl( const QString& url )
|
TomahawkApp::loadUrl( const QString& url )
|
||||||
{
|
{
|
||||||
QFile f( url );
|
if ( !url.startsWith( "tomahawk://" ) )
|
||||||
QFileInfo info( f );
|
|
||||||
if ( info.suffix() == "xspf" )
|
|
||||||
{
|
{
|
||||||
XSPFLoader* l = new XSPFLoader( true, this );
|
QFile f( url );
|
||||||
tDebug( LOGINFO ) << "Loading spiff:" << url;
|
QFileInfo info( f );
|
||||||
l->load( QUrl::fromUserInput( url ) );
|
if ( info.suffix() == "xspf" )
|
||||||
|
{
|
||||||
|
XSPFLoader* l = new XSPFLoader( true, this );
|
||||||
|
tDebug( LOGINFO ) << "Loading spiff:" << url;
|
||||||
|
l->load( QUrl::fromUserInput( url ) );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if ( info.suffix() == "jspf" )
|
else if ( info.suffix() == "jspf" )
|
||||||
{
|
{
|
||||||
JSPFLoader* l = new JSPFLoader( true, this );
|
JSPFLoader* l = new JSPFLoader( true, this );
|
||||||
tDebug( LOGINFO ) << "Loading j-spiff:" << url;
|
tDebug( LOGINFO ) << "Loading j-spiff:" << url;
|
||||||
l->load( QUrl::fromUserInput( url ) );
|
l->load( QUrl::fromUserInput( url ) );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return GlobalActionManager::instance()->openUrl( url );
|
return GlobalActionManager::instance()->openUrl( url );
|
||||||
|
Reference in New Issue
Block a user