mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-19 23:41:51 +02:00
Parse the "+" of a Tomahawk link as a space. Adium plugin defaults to using toma.hk links now.
This commit is contained in:
parent
8ca84e9ba2
commit
3277ad7802
@ -78,9 +78,9 @@ GlobalActionManager::openLinkFromQuery( const Tomahawk::query_ptr& query ) const
|
||||
}
|
||||
|
||||
QUrl
|
||||
GlobalActionManager::openLink( const QString& title, const QString& artist, const QString& album ) const
|
||||
GlobalActionManager::openLink( const QString& title, const QString& artist, const QString& album, bool tomahk ) const
|
||||
{
|
||||
QUrl link( "tomahawk://open/track/" );
|
||||
QUrl link( tomahk ? "http://toma.hk/open/track/" : "tomahawk://open/track/" );
|
||||
|
||||
if( !title.isEmpty() )
|
||||
link.addQueryItem( "title", title );
|
||||
@ -172,8 +172,9 @@ GlobalActionManager::copyToClipboard( const Tomahawk::query_ptr& query ) const
|
||||
bool
|
||||
GlobalActionManager::parseTomahawkLink( const QString& url )
|
||||
{
|
||||
if( url.contains( "tomahawk://" ) ) {
|
||||
if( url.contains( "tomahawk://" ) ) {
|
||||
QString cmd = url.mid( 11 );
|
||||
cmd.replace( "%2B", "%20" );
|
||||
qDebug() << "Parsing tomahawk link command" << cmd;
|
||||
|
||||
QString cmdType = cmd.split( "/" ).first();
|
||||
|
@ -36,7 +36,7 @@ public:
|
||||
virtual ~GlobalActionManager();
|
||||
|
||||
QUrl openLinkFromQuery( const Tomahawk::query_ptr& query ) const;
|
||||
QUrl openLink( const QString& title, const QString& artist, const QString& album ) const;
|
||||
QUrl openLink( const QString& title, const QString& artist, const QString& album, bool tomahk=false ) const;
|
||||
|
||||
void copyToClipboard( const Tomahawk::query_ptr& query ) const;
|
||||
QString copyPlaylistToClipboard( const Tomahawk::dynplaylist_ptr& playlist );
|
||||
|
@ -157,7 +157,7 @@ AdiumPlugin::openLinkFromHash( const Tomahawk::InfoSystem::InfoCriteriaHash& has
|
||||
album = hash["album"];
|
||||
}
|
||||
|
||||
return GlobalActionManager::instance()->openLink( title, artist, album );
|
||||
return GlobalActionManager::instance()->openLink( title, artist, album, true );
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
x
Reference in New Issue
Block a user