diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Plugins/Monitors/MPD.hs | 11 | ||||
-rw-r--r-- | src/StatFS.hsc | 2 |
2 files changed, 4 insertions, 9 deletions
diff --git a/src/Plugins/Monitors/MPD.hs b/src/Plugins/Monitors/MPD.hs index cb3acdf..450ad8f 100644 --- a/src/Plugins/Monitors/MPD.hs +++ b/src/Plugins/Monitors/MPD.hs @@ -57,12 +57,7 @@ runMPD args = do mpdWait :: IO () mpdWait = M.withMPD idle >> return () - where -#if defined LIBMPD_07 - idle = M.idle -#else - idle = M.idle [M.PlayerS, M.MixerS] -#endif + where idle = M.idle [M.PlayerS, M.MixerS] mopts :: [String] -> IO MOpts mopts argv = @@ -100,10 +95,10 @@ parseSong (Right Nothing) = return $ repeat "" parseSong (Right (Just s)) = let join [] = "" join (x:xs) = foldl (\a o -> a ++ ", " ++ o) x xs - str sel = maybe "" join (M.sgGetTag sel s) + str sel = maybe "" (join . map M.toString) (M.sgGetTag sel s) sels = [ M.Name, M.Artist, M.Composer, M.Performer , M.Album, M.Title, M.Track, M.Genre ] - fields = M.sgFilePath s : map str sels + fields = M.toString (M.sgFilePath s) : map str sels in mapM showWithPadding fields showTime :: Integer -> String diff --git a/src/StatFS.hsc b/src/StatFS.hsc index d007d08..e1cb89c 100644 --- a/src/StatFS.hsc +++ b/src/StatFS.hsc @@ -79,5 +79,5 @@ getFileSystemStats path = , fsStatByteCount = toI bcount * bpb , fsStatBytesFree = toI bfree * bpb , fsStatBytesAvailable = toI bavail * bpb - , fsStatBytesUsed = toI (bcount - bavail) * bpb + , fsStatBytesUsed = toI (max 0 (bcount - bavail)) * bpb } |