aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/General/hal
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2009-11-12 22:00:02 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2009-11-12 22:00:02 +0000
commit90d3aeb642ba4d6445932343010294a39b33efe2 (patch)
treeea9380c8aa1c8086b2258a8c21e8bf6486fcc141 /src/plugins/General/hal
parente7115704de07fd7a4a474447b36ae2c9cc8a8f25 (diff)
downloadqmmp-90d3aeb642ba4d6445932343010294a39b33efe2.tar.gz
qmmp-90d3aeb642ba4d6445932343010294a39b33efe2.tar.bz2
qmmp-90d3aeb642ba4d6445932343010294a39b33efe2.zip
added multiple playlists support
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1363 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/hal')
-rw-r--r--src/plugins/General/hal/halplugin.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/General/hal/halplugin.cpp b/src/plugins/General/hal/halplugin.cpp
index 002ebc0e3..1d40e0c8b 100644
--- a/src/plugins/General/hal/halplugin.cpp
+++ b/src/plugins/General/hal/halplugin.cpp
@@ -23,7 +23,7 @@
#include <qmmpui/generalhandler.h>
#include <qmmpui/mediaplayer.h>
-#include <qmmpui/playlistmodel.h>
+#include <qmmpui/playlistmanager.h>
#include <qmmpui/playlistitem.h>
#include <qmmp/qmmp.h>
#include "haldevice.h"
@@ -190,9 +190,9 @@ void HalPlugin::processAction(QAction *action)
qDebug("HalPlugin: action triggered: %s", qPrintable(action->data().toString()));
QString path = action->data().toString();
if (path.startsWith("cdda://"))
- MediaPlayer::instance()->playListModel()->addFile(path);
+ MediaPlayer::instance()->playListManager()->selectedPlayList()->addFile(path);
else
- MediaPlayer::instance()->playListModel()->addDirectory(path);
+ MediaPlayer::instance()->playListManager()->selectedPlayList()->addDirectory(path);
}
QAction *HalPlugin::findAction(const QString &dev_path)
@@ -229,7 +229,7 @@ HalDevice *HalPlugin::findDevice(QAction *action)
void HalPlugin::addPath(const QString &path)
{
- foreach(PlayListItem *item, MediaPlayer::instance()->playListModel()->items()) // Is it already exist?
+ foreach(PlayListItem *item, MediaPlayer::instance()->playListManager()->selectedPlayList()->items()) // Is it already exist?
{
if (item->url().startsWith(path))
return;
@@ -237,11 +237,11 @@ void HalPlugin::addPath(const QString &path)
if (path.startsWith("cdda://") && m_addTracks)
{
- MediaPlayer::instance()->playListModel()->addFile(path);
+ MediaPlayer::instance()->playListManager()->selectedPlayList()->addFile(path);
return;
}
else if (!path.startsWith("cdda://") && m_addFiles)
- MediaPlayer::instance()->playListModel()->addDirectory(path);
+ MediaPlayer::instance()->playListManager()->selectedPlayList()->addDirectory(path);
}
void HalPlugin::removePath(const QString &path)
@@ -250,7 +250,7 @@ void HalPlugin::removePath(const QString &path)
(!path.startsWith("cdda://") && !m_removeFiles)) //process settings
return;
- PlayListModel *model = MediaPlayer::instance()->playListModel();
+ PlayListModel *model = MediaPlayer::instance()->playListManager()->selectedPlayList();
int i = 0;
while (model->count() > 0 && i < model->count())