Ticket #13 (closed defect: invalid)

Opened 5 years ago

Last modified 5 years ago

update status parsing to support latest MPD version

Reported by: Dominic Duchemin Owned by: bens
Priority: major Milestone: beta
Component: libmpd Version: 0.4
Keywords: Cc: si_brain@…

Description

add support for single, consume, nextsong, nextsongid.

here is the patch! please review and apply.

diff -r libmpd-0.3.1/Network/MPD/Parse.hs Network/MPD/Parse.hs 105a106,109

f a ("single", x) = parse parseBool (\x' -> a { stSingle = x' }) x f a ("consume", x) = parse parseBool (\x' -> a { stConsume = x' }) x

115a120,123

f a ("nextsong", x) = parse parseNum (\x' -> a { stNextSongPos = Just (Pos x') }) x f a ("nextsongid", x) = parse parseNum (\x' -> a { stNextSongID = Just (ID x') }) x

138c146,147 < empty = Status Stopped 0 False False 0 0 Nothing Nothing (0,0) 0 0 ---

empty = Status Stopped 0 False False False False 0 0 Nothing Nothing Nothing Nothing (0,0) 0 0

diff -r libmpd-0.3.1/Network/MPD/Types.hs Network/MPD/Types.hs 71a72,73

, stSingle :: Bool , stConsume :: Bool

80a83,86

-- | Next song's position in the playlist. , stNextSongPos :: Maybe PLIndex -- | Next song's playlist ID. , stNextSongID :: Maybe PLIndex

Change History

Changed 5 years ago by joachifm

  • status changed from new to closed
  • resolution set to invalid

Hi Support for new status fields is already implemented in HEAD. Closing.

Note: See TracTickets for help on using tickets.