added dialog to add urls
This commit is contained in:
parent
4c7317f71d
commit
e1e809d8fb
9 changed files with 219 additions and 4 deletions
|
@ -17,6 +17,7 @@
|
|||
|
||||
#include <QHash>
|
||||
#include <QString>
|
||||
#include <QUrl>
|
||||
|
||||
XCollection::XCollection (XClient * client) : QObject ( client)
|
||||
{
|
||||
|
@ -162,3 +163,21 @@ XCollection::addIdlist (QString name) {
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
XCollection::playlistAddUrl (QUrl url, QString plsname)
|
||||
{
|
||||
//TODO: more tests if file is valid
|
||||
if (!url.isValid ()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (plsname == "") {
|
||||
plsname = m_activePlaylist;
|
||||
}
|
||||
|
||||
m_client->playlist ()->addUrl (url.toString ().toStdString (),
|
||||
plsname.toStdString ());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue