diff options
| author | Arno <arno@disconnect.de> | 2018-05-11 19:54:39 +0200 | 
|---|---|---|
| committer | Arno <arno@disconnect.de> | 2018-05-11 19:54:39 +0200 | 
| commit | 6ebcf9f1c7499ed577f18b999ec38ce1c50659af (patch) | |
| tree | 91db5602ad919c623c78eb8430e9bde220232a5b /playerwidget.cpp | |
| parent | f66c38a2d7395589fc34bcd596c409d4df5371e1 (diff) | |
| download | BeetPlayer-6ebcf9f1c7499ed577f18b999ec38ce1c50659af.tar.gz BeetPlayer-6ebcf9f1c7499ed577f18b999ec38ce1c50659af.tar.bz2 BeetPlayer-6ebcf9f1c7499ed577f18b999ec38ce1c50659af.zip | |
Minor fixes for WebRadio
1. Start playing on doubleClick
2. show the stream in statusBar
3. Clear everything that doesn't belong
Diffstat (limited to 'playerwidget.cpp')
| -rw-r--r-- | playerwidget.cpp | 7 | 
1 files changed, 7 insertions, 0 deletions
| diff --git a/playerwidget.cpp b/playerwidget.cpp index cc921ea..9f15524 100644 --- a/playerwidget.cpp +++ b/playerwidget.cpp @@ -178,6 +178,7 @@ void PlayerWidget::setupGui(QSplashScreen *splash){              QAction *editA = new QAction(QIcon(":/quadd.png"), tr("Edit..."), this);              connect(editA, &QAction::triggered, [this, refreshA] { WebRadioDialog dlg(this); dlg.exec(); refreshA->trigger(); });              curW->view()->addAction(editA); +            connect(curW->view(), &BeetView::doubleClicked, playA, &QAction::trigger);          }else{              QAction *addToPlayListA = new QAction(QIcon(":/belly_right.png"), tr("Add to playlist"), this);              connect(addToPlayListA, &QAction::triggered, this, &PlayerWidget::addToPlayList); @@ -861,6 +862,7 @@ void PlayerWidget::doMetadataChange(const QString &key, const QVariant &value){          nowP->setData(title, CollectionWidget::TitleRole);          nowP->setText(np);          plRoot->appendRow(nowP); +        mWebRadioView->scrollTo(mWebRadioModel->indexFromItem(nowP), QAbstractItemView::EnsureVisible);          mCurrentTE->clear();          mCurrentTE->append(QString("%1 %2").arg(tr("Artist:"), -20).arg(artist));          mCurrentTE->append(QString("%1 %2").arg(tr("Title:"), -20).arg(title)); @@ -936,6 +938,11 @@ void PlayerWidget::playUrl(const QModelIndex &idx){      mPlayA->setChecked(true);      mTrayIcon->setIcon(QIcon(":/play.png"));      emit playModeChanged(tr("Playing")); +    QString msg = QString(tr("Streaming: %1").arg(idx.data(CollectionWidget::UrlRole).toString())); +    emit message(msg); +    emit numFilesChanged(0); +    emit playListLengthChanged(0); +    mRightTE->clear();  }  void PlayerWidget::volumeChanged(int volume){ | 
