From 9ec2025cba81c6568f1e5b66554fd94654f97e91 Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <slyfox@gentoo.org>
Date: Tue, 17 Jul 2012 09:54:08 +0300
Subject: xmobar.cabal: port to libmpd-0.8.

Now all values are returned as 'Value' wrapped entries.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
---
 src/Plugins/Monitors/MPD.hs | 4 ++--
 xmobar.cabal                | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/Plugins/Monitors/MPD.hs b/src/Plugins/Monitors/MPD.hs
index cc40a56..e56260d 100644
--- a/src/Plugins/Monitors/MPD.hs
+++ b/src/Plugins/Monitors/MPD.hs
@@ -91,10 +91,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/xmobar.cabal b/xmobar.cabal
index 3b235bb..e0cd4eb 100644
--- a/xmobar.cabal
+++ b/xmobar.cabal
@@ -146,7 +146,7 @@ executable xmobar
        cpp-options: -DIWLIB
 
     if flag(with_mpd) || flag(all_extensions)
-       build-depends: libmpd == 0.7.*
+       build-depends: libmpd >= 0.8 && < 0.9
        other-modules: Plugins.Monitors.MPD
        cpp-options: -DLIBMPD
 
-- 
cgit v1.2.3