nub list of files
authorJoey Hess <joeyh@joeyh.name>
Sun, 9 Jul 2023 18:18:25 +0000 (14:18 -0400)
committerJoey Hess <joeyh@joeyh.name>
Sun, 9 Jul 2023 18:18:25 +0000 (14:18 -0400)
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
CHANGELOG

index 0af0637061e5798aa521ce73345f93e614d8c55f..befb98180155f597ee940ce12a60ccc51f0ea850 100644 (file)
@@ -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) 
index e34c4dae6bc57efbd6bbb6fdc0e55f17e19d15b6..3519f8a28f1df24a3f64218e3bd337831d7b0178 100644 (file)
--- 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 <id@joeyh.name>  Mon, 26 Jun 2023 13:10:40 -0400