From 3de20e31b070a7272a0181d17c4dcc703ba822b7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 29 Nov 2017 20:07:03 -0400 Subject: pass git config options to youtube-dl --simulate Decided not to --ignore-config by default. It the user has something in their youtube-dl config files that breaks git-annex they can configure it to use that option. --- Annex/YoutubeDl.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Annex') diff --git a/Annex/YoutubeDl.hs b/Annex/YoutubeDl.hs index e646f3fe8..65981e0df 100644 --- a/Annex/YoutubeDl.hs +++ b/Annex/YoutubeDl.hs @@ -82,5 +82,7 @@ youtubeDlTo key url dest = do -- Check if youtube-dl can still find media in an url. youtubeDlSupported :: URLString -> Annex (Either String Bool) -youtubeDlSupported url = liftIO $ catchMsgIO $ - snd <$> processTranscript "youtube-dl" [ url, "--simulate" ] Nothing +youtubeDlSupported url = catchMsgIO $ do + opts <- map Param . annexYoutubeDlOptions <$> Annex.getGitConfig + let opts' = opts ++ [ url, "--simulate" ] + liftIO $ snd <$> processTranscript "youtube-dl" opts' Nothing -- cgit v1.2.3