You are not logged in.

#1 2012-01-29 11:22:12

shadyabhi
Member
From: Bangalore
Registered: 2010-05-23
Posts: 262
Website

[SOLVED] Getting current playing song in Spotify using dbus-send

dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next
dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next

I can change the songs using these commands as both Next and Previous are methods. But, what if I want to know the Medadata? Metadata is defined as a property in the same path.

This command throws the obvious error.

dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Metadata
Error org.freedesktop.DBus.Error.UnknownMethod: No such method 'Metadata' in interface 'org.mpris.MediaPlayer2.Player' at object path '/org/mpris/MediaPlayer2' (signature '')

I am unable to use dbus-send properly.

Relevant screenshop: http://i.imgur.com/IqRw5.png

Last edited by shadyabhi (2012-01-30 02:20:19)

Offline

#2 2012-01-30 02:20:02

shadyabhi
Member
From: Bangalore
Registered: 2010-05-23
Posts: 262
Website

Re: [SOLVED] Getting current playing song in Spotify using dbus-send

Ok, I got it finally. I had to use

dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata'

Offline

Board footer

Powered by FluxBB