mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-09 15:47:38 +02:00
* Support passing a local file as parameter to a running Tomahawk instance, which in turn triggers playback.
This commit is contained in:
@@ -795,6 +795,21 @@ TomahawkApp::loadUrl( const QString& url )
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if ( TomahawkUtils::supportedExtensions().contains( info.suffix().toLower() ) )
|
||||
{
|
||||
if ( info.exists() )
|
||||
{
|
||||
QString furl = url;
|
||||
if ( furl.startsWith( "file://" ) )
|
||||
furl = furl.right( furl.length() - 7 );
|
||||
|
||||
AudioEngine::instance()->play( QUrl::fromLocalFile( furl ) );
|
||||
return true;
|
||||
}
|
||||
tDebug() << Q_FUNC_INFO << "Unable to find:" << info.absoluteFilePath();
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return GlobalActionManager::instance()->openUrl( url );
|
||||
|
Reference in New Issue
Block a user