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