diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2008-12-21 09:56:05 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2008-12-21 09:56:05 +0000 |
| commit | ac7a7dffc31afe8a20a51db4ab7749bf4fdea67c (patch) | |
| tree | 3640dfe17870fb743463b852b257ffaf9a117bb4 /src/plugins/General/mpris/playerobject.cpp | |
| parent | ae5bd442b79d44b0925e0f9b0e77c3ed74483838 (diff) | |
| download | qmmp-ac7a7dffc31afe8a20a51db4ab7749bf4fdea67c.tar.gz qmmp-ac7a7dffc31afe8a20a51db4ab7749bf4fdea67c.tar.bz2 qmmp-ac7a7dffc31afe8a20a51db4ab7749bf4fdea67c.zip | |
more mpris methods support
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@697 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General/mpris/playerobject.cpp')
| -rw-r--r-- | src/plugins/General/mpris/playerobject.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/plugins/General/mpris/playerobject.cpp b/src/plugins/General/mpris/playerobject.cpp index 4e3cc1a10..3c9d374d1 100644 --- a/src/plugins/General/mpris/playerobject.cpp +++ b/src/plugins/General/mpris/playerobject.cpp @@ -58,9 +58,12 @@ PlayerObject::PlayerObject(QObject *parent) qDBusRegisterMetaType<PlayerStatus>(); m_core = SoundCore::instance(); m_player = MediaPlayer::instance(); + m_model = m_player->playListModel(); 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())); } PlayerObject::~PlayerObject() @@ -108,9 +111,9 @@ PlayerStatus PlayerObject::GetStatus() case Qmmp::Paused: st.state = 1; }; - st.random = 0; //TODO playlist support - st.repeat = 0; - st.repeatPlayList = 0; + st.random = int(m_model->isShuffle()); + st.repeat = 0; //TODO add suppot for this + st.repeatPlayList = int(m_model->isRepeatableList()); return st; } |
