teSongInfo :: Label -> [(Variant, Variant)] -> IO ()
updateSongInfo w items = do
  let artist = case readArtist of
        Just x -> x
        Nothing -> ""
  case readTitle of
    Just title -> do
      setSongInfo w artist title
    Nothing -> return ()
  where
    readArtist :: Maybe String
    readArtist = do
      artist <- lookup (toVariant ("xesam:artist" :: String)) items
      listToMaybe $ ((unpack . unpack) artist :: [String])
    readTitle :: Maybe String
    readTitle = do
      title <- lookup (toVariant ("xesam:title" :: String)) items
      Just $ (unpack . unpack) title

up
updateSongInfo :: Label -> [(Variant, Variant)] -> IO ()
updateSongInfo w items = do
  let artist = case readArtist of
        Just x -> x
        Nothing -> ""
  case readTitle of
    Just title -> do
      setSongInfo w artist title
    Nothing -> return ()
  where
    readArtist :: Maybe String
    readArtist = do
      artist <- lookup (toVariant ("xesam:artist" :: String)) items
      listToMaybe $ ((unpack . unpack) artist :: [String])
    readTitle :: Maybe String
    readTitle = do
      title <- lookup (toVariant ("xesam:title" :: String)) items
      Just $ (unpack . unpack) title
updateSongInfo w items = do
  let artist = case readArtist of
        Just x -> x
        Nothing -> ""
  case readTitle of
    Just title -> do
      setSongInfo w artist title
    Nothing -> return ()
  where
    readArtist :: Maybe String
    readArtist = do
      artist <- lookup (toVariant ("xesam:artist" :: String)) items
      listToMaybe $ ((unpack . unpack) artist :: [String])
    readTitle :: Maybe String
    readTitle = do
      title <- lookup (toVariant ("xesam:title" :: String)) items
      Just $ (unpack . unpack) title