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/mpris/playerobject.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/plugins/General/mpris/playerobject.cpp') diff --git a/src/plugins/General/mpris/playerobject.cpp b/src/plugins/General/mpris/playerobject.cpp index 894b68617..d7166e964 100644 --- a/src/plugins/General/mpris/playerobject.cpp +++ b/src/plugins/General/mpris/playerobject.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008 by Ilya Kotov * + * Copyright (C) 2008-2009 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include "playerobject.h" @@ -53,18 +53,17 @@ const QDBusArgument &operator >> (const QDBusArgument &arg, PlayerStatus &status return arg; } -PlayerObject::PlayerObject(QObject *parent) - : QObject(parent) +PlayerObject::PlayerObject(QObject *parent) : QObject(parent) { qDBusRegisterMetaType(); m_core = SoundCore::instance(); m_player = MediaPlayer::instance(); - m_model = m_player->playListModel(); + m_pl_manager = m_player->playListManager(); connect(m_core, SIGNAL(stateChanged (Qmmp::State)), SLOT(updateCaps())); connect(m_core, SIGNAL(metaDataChanged ()), SLOT(updateTrack())); connect(m_core, SIGNAL(stateChanged (Qmmp::State)), SLOT(updateStatus())); - connect(m_model, SIGNAL(repeatableListChanged(bool)), SLOT(updateStatus())); - connect(m_model, SIGNAL(shuffleChanged(bool)), SLOT(updateStatus())); + connect(m_pl_manager, SIGNAL(repeatableListChanged(bool)), SLOT(updateStatus())); + connect(m_pl_manager, SIGNAL(shuffleChanged(bool)), SLOT(updateStatus())); connect(m_player, SIGNAL(repeatableChanged(bool)), SLOT(updateStatus())); } @@ -118,9 +117,9 @@ PlayerStatus PlayerObject::GetStatus() case Qmmp::Paused: st.state = 1; }; - st.random = int(m_model->isShuffle()); + st.random = int(m_pl_manager->isShuffle()); st.repeat = int(m_player->isRepeatable()); - st.repeatPlayList = int(m_model->isRepeatableList()); + st.repeatPlayList = int(m_pl_manager->isRepeatableList()); return st; } -- cgit v1.2.3-13-gbd6f