From 7c0e52be015c1521153d307f28486008fb733bbf Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 18 Feb 2018 09:55:23 +0100 Subject: Add Webradios to Playlist again Well, they're added, but playing them is another beast. That needs some major revamp, I fear :( --- playerwidget.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'playerwidget.cpp') 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); } -- cgit v1.2.3-70-g09d2