libmpd
An MPD client library.
http://github.com/vimus/libmpd-haskell#readme
| LTS Haskell 24.17: | 0.10.0.1 | 
| Stackage Nightly 2025-10-31: | 0.10.0.1 | 
| Latest on Hackage: | 0.10.0.1 | 
libmpd-0.10.0.1@sha256:6782337b0b060384820ab2e1831dd4d51444a2c61875240ebe9b38de15ce22a4,3927Module documentation for 0.10.0.1
- Network- Network.MPD
- Network.MPD.Applicative
- Network.MPD.Applicative.ClientToClient
- Network.MPD.Applicative.Connection
- Network.MPD.Applicative.CurrentPlaylist
- Network.MPD.Applicative.Database
- Network.MPD.Applicative.Mount
- Network.MPD.Applicative.Output
- Network.MPD.Applicative.PlaybackControl
- Network.MPD.Applicative.PlaybackOptions
- Network.MPD.Applicative.Reflection
- Network.MPD.Applicative.Status
- Network.MPD.Applicative.Stickers
- Network.MPD.Applicative.StoredPlaylists
 
- Network.MPD.Commands
- Network.MPD.Core
 
- Network.MPD.Applicative
 
- Network.MPD
libmpd-haskell: a client library for MPD
About
libmpd-haskell is a pure Haskell client library for MPD, the music playing daemon. Requires MPD version 0.19 or later.
Getting
- Latest release on Hackage
- git clone https://github.com/vimus/libmpd-haskell.git
Installation
With cabal-install, do
cd libmpd-haskell && cabal install
Usage
With GHCi:
> :set -XOverloadedStrings
> import Network.MPD
> withMPD $ lsInfo ""
Right [LsDirectory "Tool", LsDirectory "Tom Waits",...]
> withMPD $ add "Tom Waits/Big Time"
Right ["Tom Waits/Big Time/01 - 16 Shells from a Thirty-Ought-Six.mp3",...]
MPD API compliance
Any deviation from the latest version of the MPD protocol reference is a bug.
Submitting bug reports
See our bug tracker. Test cases are highly appreciated.
Submitting patches
To submit a patch, use git format-patch and email the resulting file(s) to
one of the developers or upload it to the bug tracker.
Alternatively you can create your own fork of the GitHub repository and send a pull request.
Well-formatted patches are appreciated. New features should have a test case.
See also
- vimus, an MPD client with vim-like keybindings
Resources
- API documentation
- MPD protocol reference
- Using GitHub
- #vimus @ irc.freenode.net
License
libmpd-haskell is distributed under the MIT license.
Contributors
See CONTRIBUTORS in the source distribution. Feel free to add yourself to this list if you deem it appropriate to do so.
Changes
- 
v0.10.0.1 - Fix build issues caused by removed symbols in dependencies
- Adjust textbounds
 
- 
v0.10.0.0 2021-01-25 - Require MPD version 0.19 or later.
- Breaking: listnow takes aQueryinstead of aMaybe Artist, and lists the requested tag of songs matching the query. Migrate by changinglist $Tag Nothingtolist $Tag memptyandlist Album (Just "someone")tolist Album (Artist =? "someone").
- Breaking: song ranges now expressed with the Rangedatatype rather than(Position,Position), allowing for partial ranges (see documentation). Migrate by changing(x,y)toRange x y.
- Breaking: add missing Metadataconstructors:AlbumSort,OriginalDate,Conductor,Work,Grouping,Label,MUSICBRAINZ_WORKID.
- Breaking: add missing Subsystemconstructors:PartitionS,NeighborS,MountS.
- Breaking: add missing ReplayGainModeconstructor:AutoMode.
- Breaking: move togglefromN.M.C.ExtensionstoN.M.(C|A).PlaybackControl.
- Fix: idlenow properly detects the following subsystems:PartitionS,StickerS,SubscriptionS,MessageS,NeighborS,MountS.
- Remove deprecated functions: (<&>)(use<>instead),updateId,addList,playlistAddList.
- Add monadic versions of searchAddandsearchAddPlcommands (previously only had applicative versions)
- Fix: The server setting “single: oneshot” now sets stSingletoTruerather than erroring out.
 
- 
v0.9.3.0 2021-01-02 - Drop support for GHC < 8.4, require base > 4.11.
- Bump cabal-versionto 2.4.
- Add Ordinstance forPlaylistName,Path, andValue
- Add support for MPD 0.21 style filters to the Querytype, see Filters in the MPD protocol documentation. Implemented through the added combinators/=?,%?,~?,/~?,qNot,qModSince,qFile,qBase.
 
- 
v0.9.2.0 2020-10-02 - New command: seekCur
- Add newtype Signto pass positive numbers toMPDArgwith leading+/-.
- Add monadic versions of deleteRangeandmoveRangecommands (previously only had applicative versions)
- Deprecate <&>, use<>instead.<&>will be removed in the next major version.
 
- New command: 
- 
v0.9.1.0 2020-01-27 - Support partition in Network.MPD.Status
- Ignore unknown key-value pairs in Network.MPD.status so that it breaks much less often.
 
- 
v0.9.0.10 2019-10-06 - Port it for newer network library
 
- 
v0.9.0, 2014-09-21 - New commands: deleteRange,moveRange,playlistInfoRange,searchAdd,searchAddpl.
- Fix playlistIdandlist
- Add Mixramp commands
- Support for MPD 0.17
- Support for missing metadata keys.
- Sticker idle events
- Subscription and message events
- New applicative interface which allows combining arbitrary commands into command lists (sol).
- Consistent typing for song positions (sol).
- Command definitions closer to the MPD spec; compound commands
have been moved to N.M.C.Extensions.
- Status.{stUpdatingDb,stTime,stBitrate,stVolumeare now- Maybe
- MonadMPD.getHandlehas been removed
- Re-connect and retry on ResourceVanished(e.g., when the connection times out).
 
- New commands: 
- 
v0.8.0, 2012-04-21 - Use bytestring for wire communication (sol)
- Increased type safety (sol)
- Improved memory usage (sol)
- lsinfosupports playlists (nandykins)
- idlenow takes a list of subsystems (sol)
- currentSongworks when playback is stopped (sol)
- Fixes failure on songs without associated paths (sol)
- LsResultreplaces- EntryType(nandykins)
- hspec based testing added to the test-suite
- More extensive parser testing
- MPDErrornow has an- Exceptioninstance
- Lower bound on Cabal bumped to 1.10
 
- 
v0.7.2, 2012-02-13 - Release connections. Reported by Kanisterschleife on GitHub.
- Some minor internal changes (sol)
 
- 
v0.7.1, 2012-02-07 - Compatible with GHC 7.4.1
 
- 
v0.7.0, 2011-11-22 - Several fixes to the test harness (Simon Hengel)
- Fixed issue with the (<$>) operator (Simon Hengel)
- Type safe handling of song IDs (Simon Hengel)
- Check MPD version on connect (now depends on MPD >= 0.15) (Simon Hengel)
- Compatibility with GHC 7.2 (Daniel Wagner)
 
- 
v0.6.0, 2011-04-01 - Reverted some changes from 0.5.0 that caused problems, most notably the parser improvements have been removed for now.
- Support for GHC 7
- Removed support for building against the deprecated base 3 package
- Added an Enuminstance forMetadata
- Removed the old_baseflag
 
- 
v0.5.0, 2010-09-08 - Moved extensions to Network.MPD.Commands.Extensions These might be removed in a later version
- Non-blocking idle
- The API is closer to the MPD spec, by untangling functionality
- Better MPD API coverage
- Improved parser implementation, now runs in constant space
- Constructors of the Subsystemtype have been renamed
- Passwords can be changed using setPassword
- The connection handle can be accessed via getHandle
- The version of the MPD server is available via getVersion
- Added support for connecting via unix sockets
 
- 
v0.4.2, 2010-08-31 - Only depend on QuickCheck when building the test target
 
- 
v0.4.1, 2010-03-26 - Fix building test and coverage targets
 
- 
v0.4.0, 2010-03-26 - New maintainer: Joachim Fasting <[email protected]>
- Support QuickCheck 2
- Better MPD api support Should be mostly compatible with mpd 0.16
- Separated operations on current playlist from those on specific playlists
- Fixed password sending
- Several minor fixes and cleanups
 
- 
v0.3.1, 2008-09-14 - Now reconnects if MPD closes the connection.
 
- 
v0.3.0, 2008-05-06 - UTF-8 support (now depends on utf8-string package).
- Fixed corruption by showof command parameters.
- Tidied up Queryinterface.
- Moved StringConn out of Network.MPD to the tests directory.
 
- 
v0.2.1, 2008-04-14 - Cleaned up libmpd.cabal.
 
- 
v0.2.0, 2008-04-14 - A connection stub for testing purposes.
- QuickCheck tests for parsing.
- Partial unit test coverage.
- Many bug fixes.
- Precise error handling.
- Parsing improvements.
- Code coverage generation.
- Cabal 1.2 support.
- Uniform command names.
 
- 
v0.1.3, 2007-10-02 - Bugfixes.
 
- 
v0.1.2, 2007-09-29 - Changed name to libmpd.
 
- 
v0.1.1, 2007-09-28 - Missing files added to the source distribution.
 
- 
v0.1, 2007-09-28 - Initial public release.
 
 
