fix build with old feed
This commit is contained in:
parent
a8560d932c
commit
d15bfc9061
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue