mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-21 16:31:58 +02:00
don't stop playing if a station fails, but stop station
This commit is contained in:
parent
46f3f4377a
commit
9238dcccaa
@ -77,10 +77,11 @@ DynamicModel::newTrackGenerated( const Tomahawk::query_ptr& query )
|
||||
}
|
||||
|
||||
void
|
||||
DynamicModel::stopOnDemand()
|
||||
DynamicModel::stopOnDemand( bool stopPlaying )
|
||||
{
|
||||
m_onDemandRunning = false;
|
||||
AudioEngine::instance()->stop();
|
||||
if( stopPlaying )
|
||||
AudioEngine::instance()->stop();
|
||||
|
||||
disconnect( AudioEngine::instance(), SIGNAL( loading( Tomahawk::result_ptr ) ), this, SLOT( newTrackLoading() ) );
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
virtual ~DynamicModel();
|
||||
|
||||
void startOnDemand();
|
||||
void stopOnDemand();
|
||||
void stopOnDemand( bool stopPlaying = true );
|
||||
void changeStation();
|
||||
|
||||
void loadPlaylist( const dynplaylist_ptr& playlist );
|
||||
|
@ -233,7 +233,7 @@ DynamicWidget::stationFailed( const QString& msg )
|
||||
m_view->showMessage( msg );
|
||||
|
||||
if( m_runningOnDemand ) {
|
||||
stopStation();
|
||||
stopStation( false );
|
||||
}
|
||||
}
|
||||
|
||||
@ -260,9 +260,9 @@ DynamicWidget::playPressed()
|
||||
|
||||
|
||||
void
|
||||
DynamicWidget::stopStation()
|
||||
DynamicWidget::stopStation( bool stopPlaying )
|
||||
{
|
||||
m_model->stopOnDemand();
|
||||
m_model->stopOnDemand( stopPlaying );
|
||||
m_runningOnDemand = false;
|
||||
|
||||
// TODO until i add a qwidget interface
|
||||
@ -345,9 +345,6 @@ void
|
||||
DynamicWidget::generatorError( const QString& title, const QString& content )
|
||||
{
|
||||
m_view->showMessageTimeout( title, content );
|
||||
|
||||
if( m_runningOnDemand )
|
||||
stopStation();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -77,7 +77,7 @@ public slots:
|
||||
void playlistTypeChanged(QString);
|
||||
|
||||
void startStation();
|
||||
void stopStation();
|
||||
void stopStation( bool stopPlaying = true );
|
||||
|
||||
void playPressed();
|
||||
void pausePressed();
|
||||
|
Loading…
x
Reference in New Issue
Block a user