Remote Control / Get Song Info

Asked by Joe Fry

I absolutely fell back in love with music as soon as I started listening with Pithos and now I want to take it a bit further and bring it into my living room.

I currently have an HTPC that I use for movies/music, however typically when listen to our music collection we keep the TV off and use an LCD on the front of the case to see what is playing and a remote to skip songs in our collection. I would love to use Pithos the same way, but I don't see anyway to control/monitor it without a gui and a mouse.

I have tried everything I can think of to extract the current playing song, and the best I came up with is parsing notify-osd.log... which works but is a bit cludgy (it doesn't catch it when I skip a song for example). Controlling it with a remote appears to be impossible since there are no hot keys or a command line method for controlling it.

I would be forever thankful for very basic features for monitoring and controlling pithos from the command line. Before you point me at pianobar, understand that pure command line apps don't have the WAF (wife acceptance factor) that pithos has.

Thanks a ton for a great application! These tweaks would only make it better!

Question information

Language:
English Edit question
Status:
Solved
For:
Pithos Edit question
Assignee:
No assignee Edit question
Solved by:
Joe Fry
Solved:
Last query:
Last reply:
Revision history for this message
Kevin Mehall (kevin-mehall) said :
#1

There are many options to control Pithos beyond the GUI. The easiest option is that it will use the media keys set in Gnome's Keyboard Shortcuts control panel for play/pause and skip.

If you need more, it also has a DBus API for control and monitoring from the command line or another program. Try the following commands:

dbus-send --print-reply --dest=net.kevinmehall.Pithos /net/kevinmehall/Pithos net.kevinmehall.Pithos.PlayPause
dbus-send --print-reply --dest=net.kevinmehall.Pithos /net/kevinmehall/Pithos net.kevinmehall.Pithos.SkipSong
dbus-send --print-reply --dest=net.kevinmehall.Pithos /net/kevinmehall/Pithos net.kevinmehall.Pithos.GetCurrentSong

Other DBus methods that may be useful (replace the end of the commands above) :
LoveCurrentSong, BanCurrentSong, TiredCurrentSong, Present (raises the window), IsPlaying

If you connect to the DBus API in Python or another programming language, it can trigger a DBus callback when the song or play state changes. Take a look at http://bazaar.launchpad.net/~kevin-mehall/pithos/trunk/view/head:/pithos/dbus_service.py for all the methods and signals.

Hopefully that helps, and let me know what you come up with.

-- Kevin

Revision history for this message
Joe Fry (joe-thefrys) said :
#2

Thanks, I hadn't tried DBUS because I hadn't seen any reference to it anywhere. Just after posing my question I noticed "Running Pithos remotely from 10.04 server" and saw that you did provide a DBUS interface and felt just a little sheepish. Thanks a ton, I'm sure I can make it work with a little trial and error.

Revision history for this message
KruyKaze (kruykaze) said :
#3

Is it possible to use something like this http://is.gd/cPeTHO on android? :)