From 90d3aeb642ba4d6445932343010294a39b33efe2 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Thu, 12 Nov 2009 22:00:02 +0000 Subject: added multiple playlists support git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@1363 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/General/hal/halplugin.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/plugins/General/hal/halplugin.cpp') 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 #include -#include +#include #include #include #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()) -- cgit v1.2.3-13-gbd6f