diff options
author | Joey Hess <joey@kitenet.net> | 2014-07-19 18:30:08 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-07-19 18:30:08 -0400 |
commit | 1ae3015c24b62ee712fb647fe218c04d4f579075 (patch) | |
tree | 5da85448655c93fcdec41eef45c0e5575891be6e /Command | |
parent | 9645b2afc0bf33102edd043eac70e2081faecf0c (diff) |
fix build with old feed
Diffstat (limited to 'Command')
-rw-r--r-- | Command/ImportFeed.hs | 4 |
1 files changed, 4 insertions, 0 deletions
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 |