diff options
author | Arno <arno@disconnect.de> | 2018-02-18 09:55:23 +0100 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2018-02-18 09:55:23 +0100 |
commit | 7c0e52be015c1521153d307f28486008fb733bbf (patch) | |
tree | 6e30b7cca53b2f911e7bd84bf984d6a07a10a277 | |
parent | 42174ed33d29c85a6f9fedcea2ba452be504e604 (diff) | |
download | BeetPlayer-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 :(
-rw-r--r-- | collectionwebradioview.cpp | 1 | ||||
-rw-r--r-- | playerwidget.cpp | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/collectionwebradioview.cpp b/collectionwebradioview.cpp index 94012f1..805c78c 100644 --- a/collectionwebradioview.cpp +++ b/collectionwebradioview.cpp @@ -22,6 +22,7 @@ void CollectionWebradioView::populate(){ curWr->setText(wrQ.value(0).toString()); curWr->setIcon(wrIcon); curWr->setData(wrQ.value(1), UrlRole); + curWr->setData(wrQ.value(0), TitleRole); root->appendRow(curWr); } enableSorting(); 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); } |