Debian is going to drop youtube-dl which is not active upstream, and yt-dlp
is the replacement. This will make it be used if youtube-dl gets removed.
If an old version of youtube-dl remains installed, git-annex will still use
it. That might not be desirable, but changing git-annex to use yt-dlp in
preference to youtube-dl when both are installed risks breaking when
the user has annex.youtube-dl-options set to something that is supported
by youtube-dl, but not by yt-dlp.
Sponsored-by: Boyd Stephen Smith Jr. on Patreon
return (opts ++ addopts)
youtubeDlCommand :: Annex String
-youtubeDlCommand = fromMaybe "youtube-dl" . annexYoutubeDlCommand
- <$> Annex.getGitConfig
+youtubeDlCommand = annexYoutubeDlCommand <$> Annex.getGitConfig >>= \case
+ Just c -> pure c
+ Nothing -> fromMaybe "yt-dlp" <$> liftIO (searchPath "youtube-dl")
supportedScheme :: UrlOptions -> URLString -> Bool
supportedScheme uo url = case parseURIRelaxed url of
* Sped up the initial scan for annexed files by 21%.
* init: Avoid scanning for annexed files, which can be lengthy in a
large repository. Instead that scan is done on demand.
+ * When youtube-dl is not available in PATH, use yt-dlp instead.
-- Joey Hess <id@joeyh.name> Fri, 18 Nov 2022 12:58:06 -0400
lsof,
gnupg,
bind9-host,
- youtube-dl,
+ yt-dlp,
git-remote-gcrypt (>= 0.20130908-6),
nocache,
aria2,
* `annex.youtube-dl-options`
- Options to pass to youtube-dl when using it to find the url to download
- for a video.
+ Options to pass to youtube-dl (or yt-dlp) when using it to find the url
+ to download for a video.
Some options may break git-annex's integration with youtube-dl. For
example, the --output option could cause it to store files somewhere
* `annex.youtube-dl-command`
- Command to run for youtube-dl. Default is "youtube-dl".
+ Command to run for youtube-dl. Default is to use "youtube-dl" or
+ if that is not available in the PATH, to use "yt-dlp".
* `annex.aria-torrent-options`