From 1ae3015c24b62ee712fb647fe218c04d4f579075 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 19 Jul 2014 18:30:08 -0400 Subject: fix build with old feed --- Command/ImportFeed.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Command') diff --git a/Command/ImportFeed.hs b/Command/ImportFeed.hs index e78588518..1fdba46a1 100644 --- a/Command/ImportFeed.hs +++ b/Command/ImportFeed.hs @@ -227,9 +227,13 @@ feedFile tmpl i extension = Utility.Format.format tmpl $ #endif extractMetaData :: ToDownload -> MetaData +#if MIN_VERSION_feed(0,3,9) extractMetaData i = case getItemPublishDate (item i) :: Maybe (Maybe UTCTime) of Just (Just d) -> unionMetaData meta (dateMetaData d meta) _ -> meta +#else +extractMetaData i = meta +#endif where tometa (k, v) = (mkMetaFieldUnchecked k, S.singleton (toMetaValue v)) meta = MetaData $ M.fromList $ map tometa $ extractFields i -- cgit v1.2.3