summaryrefslogtreecommitdiffstats
path: root/playerwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'playerwidget.cpp')
-rw-r--r--playerwidget.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/playerwidget.cpp b/playerwidget.cpp
index 3637560..a633fbd 100644
--- a/playerwidget.cpp
+++ b/playerwidget.cpp
@@ -382,8 +382,8 @@ void PlayerWidget::createActions(){
connect(miscMusicBrainzLeftA, &QAction::triggered, this, &PlayerWidget::searchMusicbrainzLeft);
QAction *miscFilterFromPlaylistA = new QAction(QIcon(":/chastity_belt.png"), tr("Filter artist"), this);
connect(miscFilterFromPlaylistA, &QAction::triggered, this, &PlayerWidget::filterFromPlaylist);
- QAction *addToWebRadioA = new QAction(QIcon(":/dog_hood.png"), tr("Add Webradio"), this);
- connect(addToWebRadioA, &QAction::triggered, this, &PlayerWidget::addWebRadio);
+ QAction *addToWebRadioA = new QAction(QIcon(":/dog_hood.png"), tr("Edit Webradio..."), this);
+ connect(addToWebRadioA, &QAction::triggered, this, &PlayerWidget::editWebradio);
QAction *addToFavoritesA = new QAction(QIcon(":/male_chastity_belt.png"), tr("Add to Favorites"), this);
connect(addToFavoritesA, &QAction::triggered, this, &PlayerWidget::addToFavorites);
mView->addAction(addToPlayListA);
@@ -1517,17 +1517,10 @@ void PlayerWidget::filterFromPlaylist(){
doFilter();
}
-void PlayerWidget::addWebRadio(){
+void PlayerWidget::editWebradio(){
WebRadioDialog dlg(this);
dlg.exec();
- QString desc = dlg.description();
- QString url = dlg.url();
- QSqlDatabase db = QSqlDatabase::database("beetplayerdb");
- QSqlQuery wrQ(db);
- wrQ.prepare("INSERT INTO webradio (tdescription, turl) VALUES(:d, :u)");
- wrQ.bindValue(":d", desc);
- wrQ.bindValue(":u", url);
- wrQ.exec();
+ doPopulateByWebradio();
}
void PlayerWidget::doMetadataChange(const QString &key, const QVariant &value){