added dialog to add urls

This commit is contained in:
Thomas Frauendorfer 2008-02-10 10:35:57 +01:00
parent 4c7317f71d
commit e1e809d8fb
9 changed files with 219 additions and 4 deletions

View file

@ -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;
}