~pvsr/mpd-status

02f6907969e3f716e871a68312eae124fed7924e — Peter Rice 3 months ago 075955f
Use new release of libmpd
2 files changed, 9 insertions(+), 6 deletions(-)

M Operation.hs
M mpd-status.cabal
M Operation.hs => Operation.hs +8 -5
@@ 81,9 81,12 @@ nextAlbum =
          let index = L.find (\s -> album s /= currentAlbum) pl >>= sgIndex
          if isJust index then play index else next

inc :: Int -> Int -> Int
inc step vol = min 100 $ (vol `div` step + 1) * step
inc :: Int -> Volume -> Volume
inc intStep vol = min 100 $ (vol `div` step + 1) * step
  where step = fromIntegral intStep

dec :: Int -> Int -> Int
dec step vol = max 0 (baseN `div` step) * step
  where baseN = if vol `mod` step == 0 then vol - 1 else vol
dec :: Int -> Volume -> Volume
dec intStep vol = max 0 $ steppedQuotient * step
  where step = fromIntegral intStep
        (q, r) = vol `divMod` step
        steppedQuotient = if r == 0 then q - 1 else q

M mpd-status.cabal => mpd-status.cabal +1 -1
@@ 34,7 34,7 @@ executable mpd-status
                     , aeson >=1.4 && <1.5
                     , bytestring >=0.10 && <0.11
                     , containers >=0.5 && <0.7
                     , libmpd >=0.9 && <0.10
                     , libmpd >=0.9.1 && <0.10
                     , mtl >2.2.0 && <2.3.0
                     , random >=1.1 && <1.2
                     , text >=1.2 && <1.3