From fb83e31324f6668b75860734bf737327a4a216ec Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Thu, 2 Oct 2014 06:25:19 +0200 Subject: [PATCH] * Fixed XSPFLoader and SpotifyParser inits. --- src/libtomahawk/DropJob.cpp | 6 +++--- src/libtomahawk/GlobalActionManager.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/libtomahawk/DropJob.cpp b/src/libtomahawk/DropJob.cpp index 8ffa7e368..17f517a2f 100644 --- a/src/libtomahawk/DropJob.cpp +++ b/src/libtomahawk/DropJob.cpp @@ -606,13 +606,13 @@ DropJob::handleXspfs( const QString& fileUrls ) if ( xspfFile.exists() ) { - l = new XSPFLoader( dropAction() == Create, this ); + l = new XSPFLoader( dropAction() == Create, false, this ); tDebug( LOGINFO ) << "Loading local XSPF" << xspfFile.fileName(); l->load( xspfFile ); } else if ( QUrl( url ).isValid() ) { - l = new XSPFLoader( dropAction() == Create, this ); + l = new XSPFLoader( dropAction() == Create, false, this ); tDebug( LOGINFO ) << "Loading remote XSPF" << url; l->load( QUrl( url ) ); } @@ -741,7 +741,7 @@ DropJob::handleTrackUrls( const QString& urls ) QStringList tracks = urls.split( QRegExp( "\\s+" ), QString::SkipEmptyParts ); tDebug() << "Got a list of spotify urls!" << tracks; - SpotifyParser* spot = new SpotifyParser( tracks, this ); + SpotifyParser* spot = new SpotifyParser( tracks, false, this ); connect( spot, SIGNAL( tracks( QList ) ), this, SLOT( onTracksAdded( QList< Tomahawk::query_ptr > ) ) ); m_queryCount++; } diff --git a/src/libtomahawk/GlobalActionManager.cpp b/src/libtomahawk/GlobalActionManager.cpp index fcd014673..83cc794cf 100644 --- a/src/libtomahawk/GlobalActionManager.cpp +++ b/src/libtomahawk/GlobalActionManager.cpp @@ -367,7 +367,7 @@ GlobalActionManager::parseTomahawkLink( const QString& urlIn ) if ( urlHasQueryItem( u, "xspf" ) ) { QUrl xspf = QUrl::fromUserInput( urlQueryItemValue( u, "xspf" ) ); - XSPFLoader* l = new XSPFLoader( true, this ); + XSPFLoader* l = new XSPFLoader( true, true, this ); tDebug() << "Loading spiff:" << xspf.toString(); l->load( xspf ); connect( l, SIGNAL( ok( Tomahawk::playlist_ptr ) ), ViewManager::instance(), SLOT( show( Tomahawk::playlist_ptr ) ) ); @@ -533,7 +533,7 @@ GlobalActionManager::createPlaylistFromUrl( const QString& type, const QString & if ( type == "xspf" ) { QUrl xspf = QUrl::fromUserInput( url ); - XSPFLoader* l= new XSPFLoader( true, this ); + XSPFLoader* l= new XSPFLoader( true, true, this ); l->setOverrideTitle( title ); l->load( xspf ); connect( l, SIGNAL( ok( Tomahawk::playlist_ptr ) ), this, SLOT( playlistCreatedToShow( Tomahawk::playlist_ptr) ) ); @@ -1269,7 +1269,7 @@ GlobalActionManager::playSpotify( const QUrl& url ) return false; QString spotifyUrl = urlHasQueryItem( url, "spotifyURI" ) ? urlQueryItemValue( url, "spotifyURI" ) : urlQueryItemValue( url, "spotifyURL" ); - SpotifyParser* p = new SpotifyParser( spotifyUrl, this ); + SpotifyParser* p = new SpotifyParser( spotifyUrl, false, this ); connect( p, SIGNAL( track( Tomahawk::query_ptr ) ), this, SLOT( playOrQueueNow( Tomahawk::query_ptr ) ) ); return true; @@ -1345,7 +1345,7 @@ GlobalActionManager::waitingForResolved( bool /* success */ ) bool GlobalActionManager::openSpotifyLink( const QString& link ) { - SpotifyParser* spot = new SpotifyParser( link, this ); + SpotifyParser* spot = new SpotifyParser( link, false, this ); connect( spot, SIGNAL( track( Tomahawk::query_ptr ) ), this, SLOT( handleOpenTrack( Tomahawk::query_ptr ) ) ); return true;