From e82823d44815fae178a5e88c78f8ded90a23353a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 9 Jul 2023 14:18:25 -0400 Subject: [PATCH] nub list of files yt-dlp when resumed was observed having written the same filename twice into the file list. Perhaps once by the first download and once by the resumed one? --- Annex/YoutubeDl.hs | 2 +- CHANGELOG | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Annex/YoutubeDl.hs b/Annex/YoutubeDl.hs index 0af0637061..befb981801 100644 --- a/Annex/YoutubeDl.hs +++ b/Annex/YoutubeDl.hs @@ -89,7 +89,7 @@ youtubeDl' url workdir p uo toomanyfiles cmd fs = Left $ cmd ++ " downloaded multiple media files; git-annex is only able to deal with one per url: " ++ show fs downloadedfiles cmd | isytdlp cmd = liftIO $ - (lines <$> readFile filelistfile) + (nub . lines <$> readFile filelistfile) `catchIO` (pure . const []) | otherwise = workdirfiles workdirfiles = liftIO $ filter (/= filelistfile) diff --git a/CHANGELOG b/CHANGELOG index e34c4dae6b..3519f8a28f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -13,6 +13,7 @@ git-annex (10.20230627) UNRELEASED; urgency=medium made to it since the adjusted branch was created. * importfeed: Add feedurl to the metadata (and allow it to be used in the --template) + * Improve resuming interrupted download when using yt-dlp. -- Joey Hess Mon, 26 Jun 2023 13:10:40 -0400