DBUS-support, current playing, tracklist

Bug #1414572 reported by holber
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mixxx
New
Undecided
Unassigned

Bug Description

I want to propose to include support for DBUS according to MPRIS-standaed. This would allow other applications and scripts to interface and read current information from MIXXX. A simple python script would be able to read current playing from MIXXX as below is demonstrated with both Banshee and Clementine players.

--- Banshee reading current title ----
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import dbus

bus = dbus.SessionBus()
banshee = bus.get_object("org.bansheeproject.Banshee", "/org/bansheeproject/Banshee/PlayerEngine")

currentTrack = banshee.GetCurrentTrack()
print "Current track:", currentTrack[u'name'].encode('utf-8')
------------------

And

--- Clementine reading current title and 4 titles down the list ---
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import dbus

bus = dbus.SessionBus()
player = bus.get_object('org.mpris.clementine', '/Player')
tracklist = bus.get_object('org.mpris.clementine', '/TrackList')

currentsong = tracklist.GetCurrentTrack() #integer, current song playing
playlistlength = tracklist.GetLength() #integer, playlist lengths

for i in range(currentsong,currentsong+5):
   print "Track",i,":", tracklist.GetMetadata(i)[u'title']
   i = i+1
-----------------------

Kind regards
Mikael Holber - Sweden

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Hi Mikael,

Thank you for the bug report. This would be really a nice addition.
You may copy the useful information from this bug to the original.

Do you have fun to add the DBus support to Mixxx yourself?
This should be not too hard, since Qt offers a good DBus interface.
Just ask for help.

Thank you,

Daniel

Revision history for this message
holber (mikael-holber) wrote : Re: [Bug 1414572] Re: DBUS-support, current playing, tracklist

I will ask my partner Horia for help. He has experience with QT.

Kind regards
Mikael

On Mon, Jan 26, 2015 at 12:10 PM, Daniel Schürmann <
<email address hidden>> wrote:

> *** This bug is a duplicate of bug 1326653 ***
> https://bugs.launchpad.net/bugs/1326653
>
> Hi Mikael,
>
> Thank you for the bug report. This would be really a nice addition.
> You may copy the useful information from this bug to the original.
>
> Do you have fun to add the DBus support to Mixxx yourself?
> This should be not too hard, since Qt offers a good DBus interface.
> Just ask for help.
>
> Thank you,
>
> Daniel
>
>
> ** This bug has been marked a duplicate of bug 1326653
> Report current track via MPRIS DBus interface
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1414572
>
> Title:
> DBUS-support, current playing, tracklist
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mixxx/+bug/1414572/+subscriptions
>

Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/7831

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.