# mprismote
mprismote (m-pree-mote) is a simple network remote control for
[MPRIS](http://wiki.xmms2.xmms.se/wiki/MPRIS) media players. Presently it's
hardcoded for Audacious but that's easy enough to fix with a text editor. More
elegant patches welcome.

## Installation
    sudo ruby setup.rb

## Synopsis
On the server, run
    mprismoted

On the client, run
    mprismote

## Requirements
- Ruby
- qtruby4

## Caveat
If you get an error like

    Failed to open connection to session message bus: dbus-launch failed to autolaunch D-Bus session: Autolaunch error: X11 initialization failed.

or

    Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.mpris.audacious was not provided by any .service files

it means dbus-send can't find the session bus. Probably this means you tried to
run the daemon from a separate login, e.g. over ssh, and don't have the
DBUS_SESSION_BUS_ADDRESS environment variable. The docs say you should be able
to get the information from the X root window property
_DBUS_SESSION_BUS_ADDRESS but I haven't found that to be true. AFAICT the only
way for this to work is to run mprismoted and audacious from the same login.

## CLI Junkies

    $ netcat example.com 1568
    /Player Next
    --- 
    ...
    /Player GetMetadata
    --- 
    artist: They Might Be Giants
    URI: file:////av/music/comedy/They%20Might%20Be%20Giants/Flood/06-Your%20Racist%20Friend.ogg
    title: Your Racist Friend
    codec: Ogg Vorbis [Xiph.Org libVorbis I 20020717]
    length: 174600
    album: Flood
    quality: lossy
    ...
    /TrackList GetMetadata 42
    --- 
    artist: Duran Duran
    URI: file:////av/music/80s/Duran%20Duran/Greatest/19-come%20undone.mp3
    title: come undone
    codec: MPEG-1 Audio Layer 3
    length: 254000
    genre: 80s
    album: Greatest
    quality: lossy
    ...

## License
GPLv2
