mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-09 07:36:48 +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:
@@ -78,9 +78,9 @@ GlobalActionManager::openLinkFromQuery( const Tomahawk::query_ptr& query ) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
QUrl
|
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() )
|
if( !title.isEmpty() )
|
||||||
link.addQueryItem( "title", title );
|
link.addQueryItem( "title", title );
|
||||||
@@ -174,6 +174,7 @@ GlobalActionManager::parseTomahawkLink( const QString& url )
|
|||||||
{
|
{
|
||||||
if( url.contains( "tomahawk://" ) ) {
|
if( url.contains( "tomahawk://" ) ) {
|
||||||
QString cmd = url.mid( 11 );
|
QString cmd = url.mid( 11 );
|
||||||
|
cmd.replace( "%2B", "%20" );
|
||||||
qDebug() << "Parsing tomahawk link command" << cmd;
|
qDebug() << "Parsing tomahawk link command" << cmd;
|
||||||
|
|
||||||
QString cmdType = cmd.split( "/" ).first();
|
QString cmdType = cmd.split( "/" ).first();
|
||||||
|
@@ -36,7 +36,7 @@ public:
|
|||||||
virtual ~GlobalActionManager();
|
virtual ~GlobalActionManager();
|
||||||
|
|
||||||
QUrl openLinkFromQuery( const Tomahawk::query_ptr& query ) const;
|
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;
|
void copyToClipboard( const Tomahawk::query_ptr& query ) const;
|
||||||
QString copyPlaylistToClipboard( const Tomahawk::dynplaylist_ptr& playlist );
|
QString copyPlaylistToClipboard( const Tomahawk::dynplaylist_ptr& playlist );
|
||||||
|
@@ -157,7 +157,7 @@ AdiumPlugin::openLinkFromHash( const Tomahawk::InfoSystem::InfoCriteriaHash& has
|
|||||||
album = hash["album"];
|
album = hash["album"];
|
||||||
}
|
}
|
||||||
|
|
||||||
return GlobalActionManager::instance()->openLink( title, artist, album );
|
return GlobalActionManager::instance()->openLink( title, artist, album, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Reference in New Issue
Block a user