Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

README.md

MPD.lua

Minimalist MPD client library for Lua, using luasocket.

Usage

mpd = require('mpd')
-- default values shown here:
server_settings = {
  hostname = 'localhost',
  port     = 6600,
  desc     = 'localhost',
  password = nil,
  timeout  = 1,
  retry    = 60
}

mpc = mpd.new(server_settings)

-- here are all the functions currently avaiable
mpc:next()
mpc:previous()
mpc:stop()
mpc:volume_up(delta)
mpc:volume_down(delta)
mpc:toggle_random()
mpc:toggle_repeat()
mpc:toggle_play()
mpc:seek(delta)
mpc:protocol_version()

-- But, you can always send any command mpd may accept with mpc:send().
-- Actually, the above methods are just wrappers for mpc:send(),
-- you can view all the available mpd commands here:
--     https://www.musicpd.org/doc/protocol/
-- For example, try:
mpc:send('outputs')
-- It should return a table with all information MPD
-- gives about it's outputs.

Installation

Either put mpd.lua in your package.path or install it with luarocks:

luarocks install mpd

About

Minimalist MPD client library using luasocket

Topics

Resources

License

Packages

No packages published

Languages

You can’t perform that action at this time.