summaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Command')
-rw-r--r--Command/ImportFeed.hs23
1 files changed, 12 insertions, 11 deletions
diff --git a/Command/ImportFeed.hs b/Command/ImportFeed.hs
index 32c16e527..d16362205 100644
--- a/Command/ImportFeed.hs
+++ b/Command/ImportFeed.hs
@@ -134,18 +134,19 @@ performDownload relaxed cache todownload = case location todownload of
Enclosure url -> checkknown url $
rundownload url (takeExtension url) $
addUrlFile relaxed url
- QuviLink pageurl -> checkknown pageurl $ do
- mp <- withQuviOptions Quvi.query [Quvi.quiet, Quvi.httponly] pageurl
- case mp of
- Nothing -> return False
- Just page -> case headMaybe $ Quvi.pageLinks page of
+ QuviLink pageurl -> do
+ let quviurl = setDownloader pageurl QuviDownloader
+ checkknown quviurl $ do
+ mp <- withQuviOptions Quvi.query [Quvi.quiet, Quvi.httponly] pageurl
+ case mp of
Nothing -> return False
- Just link -> do
- let quviurl = setDownloader pageurl QuviDownloader
- let videourl = Quvi.linkUrl link
- checkknown videourl $
- rundownload videourl ("." ++ Quvi.linkSuffix link) $
- addUrlFileQuvi relaxed quviurl videourl
+ Just page -> case headMaybe $ Quvi.pageLinks page of
+ Nothing -> return False
+ Just link -> do
+ let videourl = Quvi.linkUrl link
+ checkknown videourl $
+ rundownload videourl ("." ++ Quvi.linkSuffix link) $
+ addUrlFileQuvi relaxed quviurl videourl
where
forced = Annex.getState Annex.force