1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 15:59:42 +01:00

make trackURLs work again

(cherry picked from commit 4327d61df706e553d4f4d0d721b0aa4fefcef9b2)
This commit is contained in:
Michael Zanetti 2011-08-23 23:12:51 +02:00 committed by Leo Franchi
parent d47cafbebf
commit 92b612f44f

View File

@ -295,15 +295,17 @@ DropJob::handleTrackUrls( const QString& urls )
tDebug() << "Got a list of spotify urls!" << tracks;
SpotifyParser* spot = new SpotifyParser( tracks, this );
connect( spot, SIGNAL( tracks( QList<Tomahawk::query_ptr> ) ), this, SIGNAL( tracks( QList<Tomahawk::query_ptr> ) ) );
connect( spot, SIGNAL( tracks( QList<Tomahawk::query_ptr> ) ), this, SLOT( onTracksAdded( QList< Tomahawk::query_ptr > ) ) );
m_queryCount++;
} else if ( urls.contains( "rdio.com" ) )
{
QStringList tracks = urls.split( "\n" );
tDebug() << "Got a list of rdio urls!" << tracks;
RdioParser* rdio = new RdioParser( this );
connect( rdio, SIGNAL( tracks( QList<Tomahawk::query_ptr> ) ), this, SIGNAL( tracks( QList<Tomahawk::query_ptr> ) ) );
connect( rdio, SIGNAL( tracks( QList<Tomahawk::query_ptr> ) ), this, SLOT( onTracksAdded( QList< Tomahawk::query_ptr > ) ) );
rdio->parse( tracks );
m_queryCount++;
} else if ( urls.contains( "bit.ly" ) ||
urls.contains( "j.mp" ) ||
urls.contains( "t.co" ) ||
@ -314,6 +316,7 @@ DropJob::handleTrackUrls( const QString& urls )
tDebug() << "Got a list of shortened urls!" << tracks;
ShortenedLinkParser* parser = new ShortenedLinkParser( tracks, this );
connect( parser, SIGNAL( urls( QStringList ) ), this, SLOT( expandedUrls( QStringList ) ) );
m_queryCount++;
}
}
@ -321,6 +324,7 @@ DropJob::handleTrackUrls( const QString& urls )
void
DropJob::expandedUrls( QStringList urls )
{
m_queryCount--;
handleTrackUrls( urls.join( "\n" ) );
}