Skip to content
Browse files

Adapt to libmpd API change

  • Loading branch information...
1 parent 7b0fdd2 commit 9264cf11e09943c57565a52f403d60ca95a8a987 @sol committed Feb 25, 2012
Showing with 2 additions and 10 deletions.
  1. +1 −1 mpdinfo.cabal
  2. +1 −9 src/PlaybackState.hs
View
2 mpdinfo.cabal
@@ -10,7 +10,7 @@ executable mpdinfo
build-depends:
base == 4.*
- , libmpd >= 0.6 && < 0.8
+ , libmpd == 0.8.*
, containers == 0.4.*
, mtl == 2.0.*
, IfElse == 0.85.*
View
10 src/PlaybackState.hs
@@ -30,7 +30,7 @@ onChange action = do
-- wait for changes and put them into var
forever $ do
timer <- queryState var
- doUntil (MPD.PlayerS `elem`) MPD.idle
+ _ <- MPD.idle [MPD.PlayerS]
for_ timer stopTimer
-- |
@@ -58,14 +58,6 @@ queryState var = do
else
return Nothing
--- Execute given action repeatedly until its result satisfies given predicate.
-doUntil :: Monad m => (a -> Bool) -> m a -> m ()
-doUntil predicate action = do
- r <- action
- if predicate r
- then return ()
- else doUntil predicate action
-
-- |
-- Increase elapsed time of given playback state by given seconds.
updateElapsedTime :: PlaybackState -> Double -> PlaybackState

0 comments on commit 9264cf1

Please sign in to comment.
Something went wrong with that request. Please try again.