void ScriptCommand_AllTracks::enqueue() { Tomahawk::ScriptCollection* collection = qobject_cast< Tomahawk::ScriptCollection* >( m_collection.data() ); if ( collection == 0 ) { emit tracks( QList< Tomahawk::query_ptr >() ); return; } collection->resolver()->enqueue( QSharedPointer< ScriptCommand >( this ) ); }
void ScriptCommand_AllTracks::exec() { Tomahawk::ScriptCollection* collection = qobject_cast< Tomahawk::ScriptCollection* >( m_collection.data() ); if ( collection == 0 ) { reportFailure(); return; } if ( m_album.isNull() ) { reportFailure(); return; } connect( collection->resolver(), SIGNAL( tracksFound( QList< Tomahawk::query_ptr > ) ), this, SLOT( onResolverDone( QList< Tomahawk::query_ptr > ) ) ); collection->resolver()->tracks( m_collection, m_album ); }
void ScriptCommand_AllAlbums::exec() { Tomahawk::ScriptCollection* collection = qobject_cast< Tomahawk::ScriptCollection* >( m_collection.data() ); if ( collection == 0 ) { reportFailure(); return; } if ( !m_artist ) { reportFailure(); return; } connect( collection->resolver(), SIGNAL( albumsFound( QList< Tomahawk::album_ptr > ) ), this, SLOT( onResolverDone( QList< Tomahawk::album_ptr > ) ) ); collection->resolver()->albums( m_collection, m_artist ); }