summaryrefslogtreecommitdiffstats
path: root/playerwidget.cpp
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2018-02-18 09:55:23 +0100
committerArno <arno@disconnect.de>2018-02-18 09:55:23 +0100
commit7c0e52be015c1521153d307f28486008fb733bbf (patch)
tree6e30b7cca53b2f911e7bd84bf984d6a07a10a277 /playerwidget.cpp
parent42174ed33d29c85a6f9fedcea2ba452be504e604 (diff)
downloadBeetPlayer-7c0e52be015c1521153d307f28486008fb733bbf.tar.gz
BeetPlayer-7c0e52be015c1521153d307f28486008fb733bbf.tar.bz2
BeetPlayer-7c0e52be015c1521153d307f28486008fb733bbf.zip
Add Webradios to Playlist again
Well, they're added, but playing them is another beast. That needs some major revamp, I fear :(
Diffstat (limited to 'playerwidget.cpp')
-rw-r--r--playerwidget.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/playerwidget.cpp b/playerwidget.cpp
index 542d788..6dd794a 100644
--- a/playerwidget.cpp
+++ b/playerwidget.cpp
@@ -618,6 +618,17 @@ void PlayerWidget::addToPlayList(){
int type = i.data(TypeRole).toInt();
if(type == Song){
addSong(i);
+ }else if (type == Webradio){
+ mPlayListModel->clear();
+ QStandardItem *root = mPlayListModel->invisibleRootItem();
+ mPlayListModel->setHorizontalHeaderLabels(QStringList() << tr("Title"));
+ QStandardItem *wrItem = new QStandardItem;
+ wrItem->setEditable(false);
+ wrItem->setIcon(QIcon(":dog_hood.png"));
+ wrItem->setText(i.data(TitleRole).toString());
+ wrItem->setData(Webradio, TypeRole);
+ wrItem->setData(i.data(UrlRole), UrlRole);
+ root->appendRow(wrItem);
}else{
recurse(i);
}