0.0
No commit activity in last 3 years
No release in over 3 years
yet another MPD client on Ruby
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.13
~> 10.0
= 0.52.0
 Project Readme

Ruby MPD client

Gem Version
Build Status master
Build Status develop

Yet another ruby mpd client.

It does not really provide you some object model for interacting with MPD. Mostly it's just collection of MPD commands with different names.

There's MPD::Connection wrapper over Socket, MPD::ServerResponse - string with some useful methods, MPD::Playlist - verypoor abstraction over song list and MPD::Commands module that contains all implemented commands.

See on rubydoc.

Installation

gem 'ruby-mpd-client'

Usage

require 'ruby-mpd-client'

MPD::Commands::SetVolume.new(host: 'localhost') # :host can be ommited
                        .execute(75)
MPD::Commands::Next.new.execute

#
# to use one connection
#
conn = MPD::Connection.new(host: 'localhost', port: 6600)
conn.connect
conn.gets # first MPD response is always "OK <version>\n"
MPD::Commands::Next.new(connection: conn).execute
MPD::Commands::Pause.new(connection: conn).execute

For available commands see MPD::Comands subclasses on rubydoc.info.

Contributing

I guess your contribution would be a some command implementation or some models better than MPD::Playlist and MPD::Song. Feel free to create pull requests, issues or contact me.

Link to github repo

License

The gem is available as open source under the terms of the MIT License.