mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-07 17:42:35 +02:00
don't hide the setup widget in static playlists
only try generating 20 preview tracks for stations, faster
This commit is contained in:
parent
0c97c9fc1e
commit
c4a916e2e4
@ -160,7 +160,7 @@ DynamicModel::newTrackLoading()
|
||||
void
|
||||
DynamicModel::tracksGenerated( const QList< query_ptr > entries, int limitResolvedTo )
|
||||
{
|
||||
if( m_filterUnresolvable ) { // wait till we get them resolved
|
||||
if( m_filterUnresolvable && m_playlist->mode() == OnDemand ) { // wait till we get them resolved (for previewing stations)
|
||||
m_limitResolvedTo = limitResolvedTo;
|
||||
filterUnresolved( entries );
|
||||
} else {
|
||||
|
@ -75,7 +75,7 @@ DynamicWidget::DynamicWidget( const Tomahawk::dynplaylist_ptr& playlist, QWidget
|
||||
m_setup = new DynamicSetupWidget( playlist, this );
|
||||
m_setup->fadeIn();
|
||||
|
||||
connect( m_model, SIGNAL( tracksAdded() ), m_setup, SLOT( fadeOut() ) );
|
||||
connect( m_model, SIGNAL( tracksAdded() ), this, SLOT( tracksAdded() ) );
|
||||
|
||||
loadDynamicPlaylist( playlist );
|
||||
|
||||
@ -262,6 +262,14 @@ DynamicWidget::trackStarted()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
DynamicWidget::tracksAdded()
|
||||
{
|
||||
if( m_playlist->mode() == OnDemand && m_runningOnDemand && m_setup->isVisible() )
|
||||
m_setup->fadeOut();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DynamicWidget::stopStation( bool stopPlaying )
|
||||
{
|
||||
@ -349,7 +357,7 @@ void
|
||||
DynamicWidget::showPreview()
|
||||
{
|
||||
if( m_playlist->mode() == OnDemand && !m_runningOnDemand && m_model->rowCount( QModelIndex() ) == 0 ) { // if this is a not running station, preview matching tracks
|
||||
generate( 40 ); // ask for more, we'll filter how many we actually want
|
||||
generate( 20 ); // ask for more, we'll filter how many we actually want
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -89,6 +89,7 @@ public slots:
|
||||
void stationFailed( const QString& );
|
||||
|
||||
void playlistStopped( PlaylistInterface* );
|
||||
void tracksAdded();
|
||||
|
||||
private slots:
|
||||
void generate( int = -1 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user