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