diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-11-29 15:49:05 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-11-29 16:40:32 -0400 |
commit | 3b3f7512f6d0b91de21f6fcc4aba8897174bc4a8 (patch) | |
tree | 44c85fda3d6a35d62b00cca26bf6acaf474133c2 /Remote/Web.hs | |
parent | b7178922644c813a2cb69c185ca751aa234fa05b (diff) |
youtube-dl working
Including resuming and cleanup of incomplete downloads.
Still todo: --fast, --relaxed, importfeed, disk reserve checking,
quvi code cleanup.
This commit was sponsored by Anthony DeRobertis on Patreon.
Diffstat (limited to 'Remote/Web.hs')
-rw-r--r-- | Remote/Web.hs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Remote/Web.hs b/Remote/Web.hs index 233c17eb3..5ad66cb15 100644 --- a/Remote/Web.hs +++ b/Remote/Web.hs @@ -19,8 +19,7 @@ import Logs.Web import Annex.UUID import Utility.Metered import qualified Annex.Url as Url -import Annex.Quvi -import qualified Utility.Quvi as Quvi +import Annex.YoutubeDl remote :: RemoteType remote = RemoteType @@ -80,9 +79,7 @@ downloadKey key _af dest p = unVerified $ get =<< getWebUrls key untilTrue urls $ \u -> do let (u', downloader) = getDownloader u case downloader of - QuviDownloader -> do - flip (downloadUrl key p) dest - =<< withQuviOptions Quvi.queryLinks [Quvi.httponly, Quvi.quiet] u' + YoutubeDownloader -> youtubeDlTo key u' dest _ -> downloadUrl key p [u'] dest downloadKeyCheap :: Key -> AssociatedFile -> FilePath -> Annex Bool @@ -109,8 +106,7 @@ checkKey' key us = firsthit us (Right False) $ \u -> do let (u', downloader) = getDownloader u showChecking u' case downloader of - QuviDownloader -> - Right <$> withQuviOptions Quvi.check [Quvi.httponly, Quvi.quiet] u' + YoutubeDownloader -> youtubeDlSupported u' _ -> do Url.withUrlOptions $ catchMsgIO . Url.checkBoth u' (keySize key) @@ -126,4 +122,4 @@ getWebUrls :: Key -> Annex [URLString] getWebUrls key = filter supported <$> getUrls key where supported u = snd (getDownloader u) - `elem` [WebDownloader, QuviDownloader] + `elem` [WebDownloader, YoutubeDownloader] |