Maintainer | ongy |
---|---|
Stability | testing |
Portability | Linux |
Safe Haskell | None |
Language | Haskell2010 |
This module creates a persistant connection to an mpd server and allows to query information or react to events waited for with MPDs idle
- data MPDSocket
- data State
- data TagCollection = TagCollection {
- tagArtist :: Maybe Text
- tagArtistSort :: Maybe Text
- tagAlbum :: Maybe Text
- tagAlbumSort :: Maybe Text
- tagAlbumArtist :: Maybe Text
- tagAlbumArtistSort :: Maybe Text
- tagTitle :: Maybe Text
- tagTrack :: Maybe Text
- tagName :: Maybe Text
- tagGenre :: Maybe Text
- tagDate :: Maybe Text
- tagComposer :: Maybe Text
- tagPerformer :: Maybe Text
- tagComment :: Maybe Text
- tagDisc :: Maybe Text
- tagMArtistid :: Maybe Text
- tagMAlbumid :: Maybe Text
- tagMAlbumArtistid :: Maybe Text
- tagMTrackid :: Maybe Text
- tagMReleaseTrackid :: Maybe Text
- data SongInfo = SongInfo {}
- data Status = Status {
- volume :: Int
- repeats :: Bool
- random :: Bool
- single :: Maybe Bool
- consume :: Maybe Bool
- playlist :: Int
- playlistLength :: Int
- state :: State
- mixrAmpdb :: Float
- xfade :: Maybe Int
- mixrAmpDelay :: Maybe Int
- song :: Maybe Int
- songId :: Maybe Int
- nextSong :: Maybe Int
- nextSongId :: Maybe Int
- time :: Maybe Int
- elapsed :: Maybe Float
- bitrate :: Maybe Int
- duration :: Maybe Int
- audio :: Maybe (Int, Int, Int)
- updating :: Maybe Int
- mpderror :: Maybe Text
- getMPDStatus :: MPDSocket -> IO (Either String Status)
- getMPDSong :: MPDSocket -> IO (Either String SongInfo)
- getMPDSocket :: String -> String -> IO (Either String MPDSocket)
- closeMPDSocket :: MPDSocket -> IO ()
- getMPDFd :: MPDSocket -> IO Fd
- readOk :: MPDSocket -> IO (Either String ())
- goIdle :: MPDSocket -> String -> IO (Either String ())
- doQuery :: MPDSocket -> String -> ExceptT String IO [Text]
Documentation
The current state of the MPD player submodule
data TagCollection Source #
Collection of tags MPD supports
TagCollection | |
|
Information about an song
Haskell type for the data returned by MPDs status command
Status | |
|
getMPDStatus :: MPDSocket -> IO (Either String Status) Source #
Get the current status or an error from the MPD server
getMPDSong :: MPDSocket -> IO (Either String SongInfo) Source #
Get the information about the song currently beeing player from the MPD server
:: String | The host the server is on |
-> String | The port the server listens on |
-> IO (Either String MPDSocket) |
Get a new MPDSocket
readOk :: MPDSocket -> IO (Either String ()) Source #
Get the OK sent by mpd after idle out of the pipe