dlUpdateFeed :: (IConnection c) => c -> RSSFeed -> IO [RSSItem]
dlUpdateFeed conn fd = do dlxml <- download fd
                          let psfd = dlxml >>= parseFeed fd
                          if isNothing psfd then return []
                          else let (Just (feed,its)) = psfd in upgradeFeed conn 
                                                                           feed
                                                                           $ map (prep feed) its
    where prep :: RSSFeed -> RSSItem -> RSSItem
          prep fd@(RSSFeed r@(Just _) _ _ _ _) (RSSItem t u Nothing d a g p eu et id ur) = prep fd $ RSSItem t u r d a g p eu et id ur
          prep fd (RSSItem t u@(Just _) r d a Nothing p eu et id ur) = prep fd $ RSSItem t u r d a u p eu et id ur
          prep fd (RSSItem t u r d a g p eu et id Nothing) = prep fd $ RSSItem t u r d a g p eu et id (Just False)
          prep _ it = it
dlUpdateFeed :: (IConnection c) => c -> RSSFeed -> IO [RSSItem]
dlUpdateFeed conn fd = do dlxml <- download fd
                          let psfd = dlxml >>= parseFeed fd
                          if isNothing psfd then return []
                          else let (Just (feed,its)) = psfd in upgradeFeed conn 
                                                                           feed
                                                                           $ map (prep feed) its
    where prep :: RSSFeed -> RSSItem -> RSSItem
          prep fd@(RSSFeed r@(Just _) _ _ _ _) (RSSItem t u Nothing d a g p eu et id ur) = prep fd $ RSSItem t u r d a g p eu et id ur
          prep fd (RSSItem t u@(Just _) r d a Nothing p eu et id ur) = prep fd $ RSSItem t u r d a u p eu et id ur
          prep fd (RSSItem t u r d a g p eu et id Nothing) = prep fd $ RSSItem t u r d a g p eu et id (Just False)
          prep _ it = it
dlUpdateFeed conn fd = do dlxml <- download fd
                          let psfd = dlxml >>= parseFeed fd
                          if isNothing psfd then return []
                          else let (Just (feed,its)) = psfd in upgradeFeed conn 
                                                                           feed
                                                                           $ map (prep feed) its
    where prep :: RSSFeed -> RSSItem -> RSSItem
          prep fd@(RSSFeed r@(Just _) _ _ _ _) (RSSItem t u Nothing d a g p eu et id ur) = prep fd $ RSSItem t u r d a g p eu et id ur
          prep fd (RSSItem t u@(Just _) r d a Nothing p eu et id ur) = prep fd $ RSSItem t u r d a u p eu et id ur
          prep fd (RSSItem t u r d a g p eu et id Nothing) = prep fd $ RSSItem t u r d a g p eu et id (Just False)
          prep _ it = it