summaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Command')
-rw-r--r--Command/ImportFeed.hs19
1 files changed, 7 insertions, 12 deletions
diff --git a/Command/ImportFeed.hs b/Command/ImportFeed.hs
index c860f637f..1720060bd 100644
--- a/Command/ImportFeed.hs
+++ b/Command/ImportFeed.hs
@@ -286,18 +286,13 @@ performDownload opts cache todownload = case location todownload of
return False
Right b -> return b
- addmediafast linkurl mediaurl mediakey =
- youtubeDlSupported linkurl >>= \case
- Right True ->
- rundownload linkurl ".m" $ \f -> do
- addWorkTree webUUID mediaurl f mediakey Nothing
- return [mediakey]
- Right False ->
- performDownload opts cache todownload
- { location = Enclosure linkurl }
- Left msg -> do
- warning msg
- return False
+ addmediafast linkurl mediaurl mediakey = ifM (youtubeDlSupported linkurl)
+ ( rundownload linkurl ".m" $ \f -> do
+ addWorkTree webUUID mediaurl f mediakey Nothing
+ return [mediakey]
+ , performDownload opts cache todownload
+ { location = Enclosure linkurl }
+ )
defaultTemplate :: String
defaultTemplate = "${feedtitle}/${itemtitle}${extension}"