mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-21 00:09:47 +01:00
Resolve top-down
This commit is contained in:
parent
4a3b6aa1d3
commit
6ee7df9514
@ -186,6 +186,12 @@ PlaylistModel::clear()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
PlaylistModel::append( const QList< query_ptr >& queries )
|
||||
{
|
||||
onTracksAdded( queries );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
PlaylistModel::append( const Tomahawk::query_ptr& query )
|
||||
|
@ -66,6 +66,8 @@ public:
|
||||
void append( const Tomahawk::album_ptr& album );
|
||||
void append( const Tomahawk::artist_ptr& artist );
|
||||
|
||||
void append( const QList< Tomahawk::query_ptr >& queries );
|
||||
|
||||
void insert( unsigned int row, const Tomahawk::query_ptr& query );
|
||||
|
||||
void remove( unsigned int row, bool moreToCome = false );
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "utils/tomahawkutils.h"
|
||||
#include "utils/logger.h"
|
||||
#include <dynamic/GeneratorInterface.h>
|
||||
#include <pipeline.h>
|
||||
|
||||
#define HISTORY_TRACK_ITEMS 25
|
||||
#define HISTORY_PLAYLIST_ITEMS 10
|
||||
@ -224,11 +225,14 @@ WhatsHotWidget::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestDat
|
||||
|
||||
PlaylistModel* trackModel = new PlaylistModel( ui->tracksViewLeft );
|
||||
trackModel->setStyle( TrackModel::Short );
|
||||
QList<query_ptr> tracklist;
|
||||
foreach ( const Tomahawk::InfoSystem::ArtistTrackPair& track, tracks )
|
||||
{
|
||||
query_ptr query = Query::get( track.artist, track.track, QString(), uuid() );
|
||||
trackModel->append( query );
|
||||
query_ptr query = Query::get( track.artist, track.track, QString(), uuid(), false );
|
||||
tracklist << query;
|
||||
}
|
||||
Pipeline::instance()->resolve( tracklist );
|
||||
trackModel->append( tracklist );
|
||||
|
||||
const QString chartId = requestData.input.value< Tomahawk::InfoSystem::InfoCriteriaHash >().value( "chart_id" );
|
||||
m_trackModels[ chartId ] = trackModel;
|
||||
|
Loading…
x
Reference in New Issue
Block a user