mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 11:20:22 +02:00
* Fixed XSPFLoader and SpotifyParser inits.
This commit is contained in:
@@ -606,13 +606,13 @@ DropJob::handleXspfs( const QString& fileUrls )
|
|||||||
|
|
||||||
if ( xspfFile.exists() )
|
if ( xspfFile.exists() )
|
||||||
{
|
{
|
||||||
l = new XSPFLoader( dropAction() == Create, this );
|
l = new XSPFLoader( dropAction() == Create, false, this );
|
||||||
tDebug( LOGINFO ) << "Loading local XSPF" << xspfFile.fileName();
|
tDebug( LOGINFO ) << "Loading local XSPF" << xspfFile.fileName();
|
||||||
l->load( xspfFile );
|
l->load( xspfFile );
|
||||||
}
|
}
|
||||||
else if ( QUrl( url ).isValid() )
|
else if ( QUrl( url ).isValid() )
|
||||||
{
|
{
|
||||||
l = new XSPFLoader( dropAction() == Create, this );
|
l = new XSPFLoader( dropAction() == Create, false, this );
|
||||||
tDebug( LOGINFO ) << "Loading remote XSPF" << url;
|
tDebug( LOGINFO ) << "Loading remote XSPF" << url;
|
||||||
l->load( QUrl( url ) );
|
l->load( QUrl( url ) );
|
||||||
}
|
}
|
||||||
@@ -741,7 +741,7 @@ DropJob::handleTrackUrls( const QString& urls )
|
|||||||
QStringList tracks = urls.split( QRegExp( "\\s+" ), QString::SkipEmptyParts );
|
QStringList tracks = urls.split( QRegExp( "\\s+" ), QString::SkipEmptyParts );
|
||||||
|
|
||||||
tDebug() << "Got a list of spotify urls!" << tracks;
|
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<Tomahawk::query_ptr> ) ), this, SLOT( onTracksAdded( QList< Tomahawk::query_ptr > ) ) );
|
connect( spot, SIGNAL( tracks( QList<Tomahawk::query_ptr> ) ), this, SLOT( onTracksAdded( QList< Tomahawk::query_ptr > ) ) );
|
||||||
m_queryCount++;
|
m_queryCount++;
|
||||||
}
|
}
|
||||||
|
@@ -367,7 +367,7 @@ GlobalActionManager::parseTomahawkLink( const QString& urlIn )
|
|||||||
if ( urlHasQueryItem( u, "xspf" ) )
|
if ( urlHasQueryItem( u, "xspf" ) )
|
||||||
{
|
{
|
||||||
QUrl xspf = QUrl::fromUserInput( urlQueryItemValue( 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();
|
tDebug() << "Loading spiff:" << xspf.toString();
|
||||||
l->load( xspf );
|
l->load( xspf );
|
||||||
connect( l, SIGNAL( ok( Tomahawk::playlist_ptr ) ), ViewManager::instance(), SLOT( show( Tomahawk::playlist_ptr ) ) );
|
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" )
|
if ( type == "xspf" )
|
||||||
{
|
{
|
||||||
QUrl xspf = QUrl::fromUserInput( url );
|
QUrl xspf = QUrl::fromUserInput( url );
|
||||||
XSPFLoader* l= new XSPFLoader( true, this );
|
XSPFLoader* l= new XSPFLoader( true, true, this );
|
||||||
l->setOverrideTitle( title );
|
l->setOverrideTitle( title );
|
||||||
l->load( xspf );
|
l->load( xspf );
|
||||||
connect( l, SIGNAL( ok( Tomahawk::playlist_ptr ) ), this, SLOT( playlistCreatedToShow( Tomahawk::playlist_ptr) ) );
|
connect( l, SIGNAL( ok( Tomahawk::playlist_ptr ) ), this, SLOT( playlistCreatedToShow( Tomahawk::playlist_ptr) ) );
|
||||||
@@ -1269,7 +1269,7 @@ GlobalActionManager::playSpotify( const QUrl& url )
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
QString spotifyUrl = urlHasQueryItem( url, "spotifyURI" ) ? urlQueryItemValue( url, "spotifyURI" ) : urlQueryItemValue( url, "spotifyURL" );
|
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 ) ) );
|
connect( p, SIGNAL( track( Tomahawk::query_ptr ) ), this, SLOT( playOrQueueNow( Tomahawk::query_ptr ) ) );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -1345,7 +1345,7 @@ GlobalActionManager::waitingForResolved( bool /* success */ )
|
|||||||
bool
|
bool
|
||||||
GlobalActionManager::openSpotifyLink( const QString& link )
|
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 ) ) );
|
connect( spot, SIGNAL( track( Tomahawk::query_ptr ) ), this, SLOT( handleOpenTrack( Tomahawk::query_ptr ) ) );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user