diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-11-28 17:17:40 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-11-28 17:17:40 -0400 |
commit | 8c07e4dbf7d5145ed6412278c4288e3c405484ed (patch) | |
tree | 7effa3381806d82284e0a2491ef6c60699aa90d5 /Logs | |
parent | 24371d8597bd9acfb8251f3cb829355f4b4f5241 (diff) |
wip
Diffstat (limited to 'Logs')
-rw-r--r-- | Logs/Web.hs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Logs/Web.hs b/Logs/Web.hs index ba71cb17d..abea00db6 100644 --- a/Logs/Web.hs +++ b/Logs/Web.hs @@ -100,15 +100,15 @@ removeTempUrl :: Key -> Annex () removeTempUrl key = Annex.changeState $ \s -> s { Annex.tempurls = M.delete key (Annex.tempurls s) } -data Downloader = WebDownloader | QuviDownloader | OtherDownloader +data Downloader = WebDownloader | YoutubeDownloader | QuviDownloader | OtherDownloader deriving (Eq, Show) {- To keep track of how an url is downloaded, it's mangled slightly in - - the log. For quvi, "quvi:" is prefixed. For urls that are handled by - - some other remote, ":" is prefixed. -} + - the log, with a prefix indicating when a Downloader is used. -} setDownloader :: URLString -> Downloader -> String setDownloader u WebDownloader = u setDownloader u QuviDownloader = "quvi:" ++ u +setDownloader u YoutubeDownloader = "yt:" ++ u setDownloader u OtherDownloader = ":" ++ u setDownloader' :: URLString -> Remote -> String @@ -118,6 +118,9 @@ setDownloader' u r getDownloader :: URLString -> (URLString, Downloader) getDownloader u = case separate (== ':') u of - ("quvi", u') -> (u', QuviDownloader) + ("yt", u') -> (u', YoutubeDownloader) + -- quvi is not used any longer; youtube-dl should be able to handle + -- all urls it did. + ("quvi", u') -> (u', YoutubeDownloader) ("", u') -> (u', OtherDownloader) _ -> (u, WebDownloader) |