Skip to content
This repository has been archived by the owner on Jul 28, 2019. It is now read-only.

Commit

Permalink
[wip] Unsuccessful attempts to fix MPRIS 2.0 in VLC 2.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
mosra committed Mar 10, 2012
1 parent 6f86957 commit 9869759
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Core/VlcPlayer.cpp
Expand Up @@ -24,12 +24,13 @@
namespace HeyTrack { namespace Core {

VlcPlayer::VlcPlayer(QObject* parent): AbstractPlayer(parent) {
playerInterface = new QDBusInterface("org.mpris.vlc", "/Player", "", QDBusConnection::sessionBus(), this);
tracklistInterface = new QDBusInterface("org.mpris.vlc", "/TrackList", "", QDBusConnection::sessionBus(), this);
playerInterface = new QDBusInterface("org.mpris.MediaPlayer2.vlc", "/Player", "", QDBusConnection::sessionBus(), this);
tracklistInterface = new QDBusInterface("org.mpris.MediaPlayer2.vlc", "/TrackList", "", QDBusConnection::sessionBus(), this);
}

bool VlcPlayer::isPlaying() {
QDBusReply<Mpris1::Status> reply = playerInterface->call("GetStatus");
/** @todo wtf Mpris1 */
QDBusReply<Mpris1::Status> reply = playerInterface->call("PlaybackStatus");

if(reply.isValid())
return reply.value().play == 0;
Expand Down

0 comments on commit 9869759

Please sign in to comment.