From bb60087de2bdade9a0c88db1849575e54eb5d67d Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 18 Feb 2018 16:31:11 +0100 Subject: Trigger stop action afters starting up There's a corner case I don't know how to handle: if the playlist is empty and play is clicked, the state will be Playing. Seems very complex to handle that... :( --- playerwidget.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'playerwidget.cpp') diff --git a/playerwidget.cpp b/playerwidget.cpp index 796ed71..54c84fe 100644 --- a/playerwidget.cpp +++ b/playerwidget.cpp @@ -58,6 +58,7 @@ PlayerWidget::PlayerWidget(QSplashScreen *splash, QWidget *parent) : QWidget(par mWebDownloader = new WebDownloader(this); connect(mWebDownloader, &WebDownloader::done, this, &PlayerWidget::webDlDone); mStarting = false; + mStopA->trigger(); } PlayerWidget::~PlayerWidget(){ @@ -725,11 +726,6 @@ void PlayerWidget::randomPlay(){ } void PlayerWidget::playCurrent(const QModelIndex &index){ - /*int isRemote = index.data(CollectionWidget::RemoteRole).toInt(); - if(isRemote){ - playUrl(index.data(CollectionWidget::UrlRole).toString()); - return; - }*/ mPlayer->stop(); QString fullPath = index.data(CollectionWidget::FullPathRole).toString(); play(fullPath); -- cgit v1.2.3-70-g09d2